Start an Apache Web Server in Mac OS X

The Apache web server remains bundled with Mac OS X, but you’ll need to turn to the command line to enable the web server. Additionally, you’ll want edit a user configuration file for each user account on the Mac to have the personal web sharing feature active. If any of this sounds intimidating or complex, it’s really not, just follow along and you’ll have a simple web server running on your Mac in no time.

  • Open the terminal (command line)
  • You you will start the Apache web server with the following command:
         sudo apachectl start
  • Launch Safari, Chrome, or Firefox and navigate to or
    to verify the server is running, you will see an “It Works!” message

Apache Web Server Documents Location & User Sites Folders

You can find the apache webserver files and ‘It Works!’ html in the following location:


Shutting Down Apache & Restarting Apache Server

To shut down the web server, go back to the command line and type the following:

sudo apachectl stop

If you make changes to the server and just want to restart it, that can be accomplished with the following command instead:

sudo apachectl restart

The default Apache server is barebones and does not have PHP, MySQL, or anything particularly fancy enabled.






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s