Everyone knows that starting Apache involves the issuance of the command:
./apachectl start
Or, for SSL:
./apachectl startssl
To shut her down, it is:
./apachectl stop
And, if you would like to bounce the server:
./apachectl restart
But, there is another highly useful command argument for apachectl, and it is graceful.
From Apache HTTP Server Control Interface:
Gracefully restarts the Apachehttpddaemon. 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. This command automatically checks the configuration files as inconfigtestbefore initiating the restart to make sure Apache doesn't die. This is equivalent toapachectl -k graceful.
Basically, it lets configuration changes take effect on the fly without disrupting any of your current connections.
Comments