What is the command to restart Apache 2.2.9?

link|improve this question

78% accept rate
better still, do you get a way to manage Apache - that is like the IIS7 snapin? – JL. Aug 6 '09 at 17:45
You might want to ask a separate question regarding Apache Management. – Andy May Aug 6 '09 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 '09 at 23:18
feedback

3 Answers

up vote 8 down vote accepted

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.

link|improve this answer
feedback

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
link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.