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.