start, stop or restart Apache from the console terminal in Mac OS X

Written by
Date: 2012-05-27 07:38:00 00:00

When you need to start, stop or restart the Apache (httpd) service on Mac OS X. And you are connected via ssh or telnet to the console terminal of the server, you can still control Apache (httpd) daemon.

To start httpd:

sudo /usr/sbin/apachectl start

To stop httpd:

sudo /usr/sbin/apachectl stop

To restart httpd:

sudo /usr/sbin/apachectl restart