We use cookies to keep our site relevant and easy to use, your continued use of this site is consent that we may set several cookies (see our Privacy & Cookie Policy), click to always allow cookies from our site (and not see this notifcation on your next visit) or read more.Allow Cookies

EU legislation requires that all websites clearly specify if cookies are being used and their purpose, You can read more about how we use cookies (and which cookies we use) in our Privacy and Cookie Policy.

You will see this notification the first time you visit our website unless you accept cookies (in which case we'll set a cookie to remember thay you're happy for us to to set cookies!).

Restarting Apache/httpd

Did a little bit of Apache reading after a client query yesterday, it seems restarting httpd is not all that it seems!

start – start httpd
startssl – start httpd with SSL enabled
stop – stop httpd
restart – restart httpd if running by sending a SIGHUP or start if
not running
fullstatus – dump a full status screen; requires lynx and mod_status enabled
status – dump a short status screen; requires lynx and mod_status enabled
graceful – do a graceful restart by sending a SIGUSR1 or start if not running

Is the normal course of events from apachectl, but what about if we want to restart with SSL?

A route around this as sugeested by someone is to remove all the stuff in the apache config file, or altertively edit the HTTPD definitiona tthe top of apachectl so that it ALWAYS passes -DSSL), then use normal start/restart/graceful

Now we’re on the subject of graceful, I have found out that it mean no existing or pendings connections are lost during the restart!

Apache: The Definitive Guide Setting Up LAMP: Getting Linux, Apache, MySQL, and PHP Working Together (Transcend Technique)

This entry was posted on Friday, March 2nd, 2007 at 11:06 am and is filed under Linux. You can follow any responses to this entry through the RSS 2.0 feed.

Comments (1)


  1. adrianbanks says:

    When I used to administer an apache server, I always restarted using the graceful command.

    As I remember (it was a few years ago), the graceful restart stops the current request handler from accepting new connections, but allows it to deal with existing requests. Once all of its request have been dealt with it is killed off. Whilst this is happenning, a new request handler is made to deal with new requests, which then remains as the sole request handler when the other one is killed off. Quite a nice feature.

Leave a Reply