Create a basic web-server on Mac OS X

Thu, Nov 14

Mac OS X (including Mavericks) has an integrated web-server. This is really handy if you need to do run through some basic development/testing from your Mac, without the trouble of finding/configuring a remote server.

Follow these steps:

1) Run the following from a terminal:
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist

2) Place html content into the folder /Library/WebServer/Documents/

3) Open web-browser and point to: http://localhost/filename