Home > Apache, how do I?, ubuntu > Stop & Start Apache2.2 on Ubuntu 6.06

Stop & Start Apache2.2 on Ubuntu 6.06

In my last post I discussed where exactly the Apache2.2 executable was located in an Ubuntu 6.06 installation. (This assumes you have installed Apache2.2 at the time of installation, or at some point subsequent.) Once you have actually installed Apache2.2 – and know where it is located on your system – you are ready to start, stop, and restart the application.

Apache advises invoking the httpd daemon via the apachectl script. The syntax to stop, start, and restart Apache2.2 is the exectuable script name followed by the parameter “-k” and then the action you wish to take [start/stop/restart]. For starting the httpd daemon, you can pass the “-f” parameter to indicate the location of the configuration file to be used for start-up, and omit the “start” action command. (I assume it is implied.)

The commands look like this:

/usr/sbin# ./apachectl -f /etc/apache2/apache2.conf

/usr/sbin# ./apachectl -k stop

/usr/sbin# ./apachectl -k restart

If you want to do things “gracefully” – and who doesn’t – you can issues the commands to stop and re-start Apache2.2 in a graceful manner. That is, the parent process “advises” the children processes to stop when they have finished serving up what they’ve got, and all others to stop immediately.

To do a graceful restart:

/usr/sbin# ./apachectl -k graceful

To do a graceful shutdown:

/usr/sbin# ./apachectl -k graceful-stop

Here is the actual manual for running Apache 2.2.

Advertisements
Categories: Apache, how do I?, ubuntu
  1. No comments yet.
  1. November 27, 2007 at 10:12 pm

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: