logo
Published on Technical articles on: Windows servers, Apache Web Server, MySQL, PHP, IIS (http://www.sitebuddy.com)

Graceful restart of Apache

By chris
Created 24 Jan 2006 - 11:53am
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

Source URL:
http://www.sitebuddy.com/Apache/Windows/Restart/Graceful