I have Apache installed on OS X and I want to know what command I can use to:

  • start apache
  • stop apache
  • restart apache
  • gracefully restart apache

Also I want to know if the commands were successful or not.

Apache seams to be installed as org.apache.httpd or at least this is what sudo launchctl list|grep apache shows.

  • Not sure why but launchctl stop org.apache.httpd doesn't do anything but service stop org.apache.httpd seems to work even if it does warn me that I should use launchctl instead. – sorin Jun 30 '11 at 9:26
  • If your apache has launchd configuration files, then you would have to load and unload the org.apache.httpd to affect launchd control over the app. Are you using the built in apache or installing it yourself? – bmike Jun 30 '11 at 21:24

I use the apachectl command

sudo apachectl stop
sudo apachectl start
sudo apachectl restart
sudo apachectl -k graceful

Hope this helps


You must log in to answer this question.

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