How to change apache to do graceful restarts in DirectAdmin

To do that, you’ll need to change your httpd boot script.
The path for your script will vary depending on your OS.

For FreeBsd it’s:
/usr/local/etc/rc.d/httpd

For all other OS’s, it’s:
/etc/init.d/httpd

As for the actual change, you’ll edit the httpd boot script for your system, find this code:

restart)
stop
waitforexit “httpd” 20
start
;;

and change it to read:

restart)
kill -USR1 `cat $PIDFILE`
;;

An apache restart will no longer start apache if it’s stopped. You must “start” it, as the graceful restart only works on already running processes.

Source : http://directadmin.com

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.