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

by Vivek Gite on January 6, 2009 · 1 comment

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 follows:

Login as root and type the following command
# /etc/init.d/httpd reload
OR
# 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.

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 1 comment… read it below or add one }

1 Juan January 7, 2009

If running Apache with daemontools you can do this by:
svc -h /service/apache

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 4 + 6 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: