Graceful restart of Apache
Submitted by chris on January 24, 2006 - 11:53.
httpd.conf & .htaccess
To restart Apache 2.2.0 and let the current threads finish and be regenerated use
the command:
apache -k restart
This forces it to reread the configuration file. Any operations in progress are allowed to complete without interruption.
Note: This will attemp to gracefully restart the "Apache2" service. If your Apache service has a different name use the -n option (see following example).
For example, I created a .bat file on my desktop named RestartApache220.bat containing:
F:\Apache220\bin\httpd.exe -k restart -n Apache220
My Apache service is called "Apache220"
Note: It appears on Windows we can find different names for the main Apache program:
httpd.exe
apache.exe
Please remember to adjust our example accordingly.
Ref:
http://httpd.apache.org/docs/2.2/stopping.html#graceful
apache -k restart
This forces it to reread the configuration file. Any operations in progress are allowed to complete without interruption.
Note: This will attemp to gracefully restart the "Apache2" service. If your Apache service has a different name use the -n option (see following example).
For example, I created a .bat file on my desktop named RestartApache220.bat containing:
F:\Apache220\bin\httpd.exe -k restart -n Apache220
My Apache service is called "Apache220"
Note: It appears on Windows we can find different names for the main Apache program:
httpd.exe
apache.exe
Please remember to adjust our example accordingly.
Ref:
http://httpd.apache.org/docs/2.2/stopping.html#graceful


delicious
digg
reddit
google
technorati