Restart Apache 2 In Mac OS X

You can restart Apache 2 in Mac OS X using the Terminal. Here’s how:

  1. Open the Terminal application. You can find it in the Utilities folder within the Applications folder.
  2. Type the following command to stop Apache 2:
sudo apachectl stop

You will be prompted for your password. Enter your password to continue.

  1. Type the following command to start Apache 2:
sudo apachectl start

That’s it! Apache 2 should now be restarted and running.

Note that in some versions of Mac OS X, the Apache 2 service may be set to automatically start when your computer starts up. If this is the case, you can use the following command to restart Apache 2 without having to stop it first:

sudo apachectl restart

Leave a Comment