1

What is the command to restart Apache 2.2.9?

3
  • better still, do you get a way to manage Apache - that is like the IIS7 snapin?
    – JL.
    Aug 6, 2009 at 17:45
  • You might want to ask a separate question regarding Apache Management.
    – Andy May
    Aug 6, 2009 at 17:56
  • Is this on Windows or Linux? Why are you restarting? You need to be more specific and provide more details when you ask questions.
    – Ernie
    Aug 6, 2009 at 23:18

3 Answers 3

9

Typically

apache2ctl restart

does a complete restart (shut it down and start it up again), or

apache2ctl graceful

does a "graceful restart" which waits for any existing connections to close before restarting. But it could depend on which operating system you're using. On mine (Gentoo Linux) the preferred way is

/etc/init.d/apache2 restart

or

/etc/init.d/apache2 reload

for example.

1

May be different if Apacxhe is installed with a different path but:

$ /usr/local/bin/apachectl restart

or look for a boot script like:

$ /etc/init.d/httpd stop
$ /etc/init.d/http start
0

If you're in the redhat family of distros (RHEL, CentOS, Fedora, etc) the proper way is

/sbin/service httpd restart

a lot of times you can get away with

/sbin/service httpd graceful

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .