SOHO : Small Office Home Office
Freeware - Opensource software tips, tricks, tweaks & fixes for managing, securing, improving the performance of SOHO Desktop, Laptop, Networks

Saturday, January 24, 2009

Apache: Make Changes In a Config File Take Effect Without Restarting Server

Q. How do I make changes in a Apache server config file to take effect without restarting the Apache server itself w/o interrupting users' current session?
A. You can use httpd service or apachectl to reload configuration without interrupting users' sessions as

Login as root and type the following command
# /etc/init.d/httpd reload

# apachectl -k graceful
This is also known as gracefully restarting the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that the old log files are closed before processing them.
If running Apache with daemontools you can do this by:
svc -h /service/apache
Source :

No comments:

Post a Comment