Mac OS X Start / Stop Apache Web Server

by on July 16, 2009 · 2 comments· last updated at July 16, 2010

How do I start or stop Apache web server using shell prompt option under Apple OS X UNIX operating systems?

The apachectl command act as Apache HTTP Server control interface. Open the terminal and type the following command to stop Apache web server:

sudo apachectl stop

OR

sudo apachectl -k stop

To start Apache web server again, enter:

sudo apachectl start

OR

sudo apachectl -k start

The following will restart apache web server, enter:

sudo apachectl restart

OR

sudo apachectl -k restart

You can displays a brief status report by visiting the url http://localhost:80/server-status in the web browser of your choice.



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 2 comments… read them below or add one }

1 Antony July 14, 2012 at 7:26 pm

For some interesting reason, apache keeps spawning off new process however I kill it. I tried apachectl and kill -SIGTERM but apache would be killed and another process will be spawned right away.
Can you tell me why?

Reply

2 flamencoman July 24, 2012 at 10:31 am

I have the same problem as you Antony.
I’ve used MAMP and then switched to Mac’s default Apache and problem still exists.
I think it is somehow related to xdebug. I’ll try zend_debugger. If that doesn’t work, I’m switching to another operating system.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: