August 26, 2013, 3:48 PM — Here's how you can enable the web server in OS X Mountain Lion.
1. Open a terminal window (look in the Utilities folder for the Terminal app).
2. Type in the following command to start the web server (it will only run until you reboot your Mac):
sudo apachectl start
3. To run the web server permanently, use this command instead:
sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool false
Now the web server will launch each time you boot your Mac.
Read more: Cult of Mac