Monday, April 30, 2012

Mac OS X Start / Stop Apache Web Server

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.

No comments:

Post a Comment