Websites become temporarily unavailable when configuration of some domain is changed. How to set up Apache restart every day in certain time?
Plesk does not have a direct functionality to schedule Apache restarts on a particular time of the day.
There are two options to implement it:
- Set Apache no keep established HTTP connections when applying new configuration:
- configure Apache graceful restart
- set Apache restart interval to 0 in Tools & Settings > Apache Web Server.
- install Watchdog extension to monitor Apache
- Create a scheduled task to restart Apache every day:
- set Apache restart interval to
9999in Tools & Settings > Apache Web Server
- go to Tools & Settings > Schedule Tasks and add a task:
Note: customize the task execution time according to your needs.
The first option is recommended, as in that case the websites will always stay accessible. However, in certain environments Apache graceful restart may not be stable. For this reason, Watchdog service monitor should be installed.