Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the command to restart Apache 2.2.9?

share|improve this question
    
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
add comment

3 Answers

up vote 9 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.

share|improve this answer
add comment

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
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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