After installing Mountain Lion on my Macbook, I decided to prepare and set up software development tools in it. One of it is activate web sharing feature which can be found at System Preferences > Sharing on previous version. I was very suprise that apple seems remove it from the list.
By searching some references on internet, here are the things that I did. Apache actually is pre-installed on Mountain Lion and we just need to enable it via the command line.
We will be asked to enter login password for starting it. Enter a password then open in browser localhost website. You should get the following display
Historically, OSX has had 2 web roots. One at a system level and the other one at a user level. The user level one allows multiple acounts to have their own web root whilst the system one is global for all users. The location of system web document root is at
On the other hand, the user level web roots in the previous version of OSX (Lion) can be found under ~/Sites. But we can not find that directory anymore in Mountain Lion. So we need to create it manually.
In terminal type:
Edit username.conf in vi editor as is the following code:
1 2 3 4 5 6
Then create html page inside ~/Sites to test our user local website and save it as index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Congratulation your apache is running well now :)