What is the command to restart Apache 2.2.9?
-
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 MayAug 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.– ErnieAug 6, 2009 at 23:18
3 Answers
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.
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
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