Question
-
How to enable/disable graceful restart for Apache in Plesk?
-
How to make Apache reload instead of restarting when applying settings in Plesk?
Answer
Note: Graceful restart for Apache is enabled by default on all new Plesk Obsidian installations.
-
Go to Tools & Settings > Apache Web Server.
-
Enable/disable the Apache graceful restart option and apply the changes.
To enable Apache graceful restart, set the restart_apache_gracefully
parameter to true
in the psa.misc
table:
-
Connect to the Plesk server via SSH.
-
For security reasons, create a dump of the Plesk database:
# plesk db dump psa > psa_backup.$(date +%F_%R).sql
-
Run the following command:
-
To enable Apache graceful restart
# plesk db “INSERT INTO psa.misc VALUES (‘restart_apache_gracefully’, ‘true’)”
-
If
restart_apache_gracefully
already exists (the command above fails with “Duplicate entry”) in thepsa.misc
table, run:# plesk db “UPDATE psa.misc SET val=’true’ WHERE param = ‘restart_apache_gracefully'”
-
-
To disable Apache graceful restart
# plesk db “UPDATE psa.misc SET val=’false’ WHERE param = ‘restart_apache_gracefully'”
-
-
Check Apache graceful restart status with the command:
# plesk db “select * from psa.misc WHERE param = ‘restart_apache_gracefully'”
where true – Apache graceful restart is enabled, false – disabled.