My Android Blog

To view my posts on Android you can visit my Android Blog

Search This Blog

Wednesday, September 11, 2013

Start a Apache Webserver on Mac

Knowing that the OS X on Mac is built on Linux, I was expecting some web server to be installed by default on Mac book air too. And I was not disappointed to see that Apache server is indeed available.

It is so simple to turn it on and here are the steps for the same:

Click on System preferences: (This is based on Mac OS X 10.7.5 – MacBook Air).


Click on Sharing

Check Web Sharing

And start the start the computer’s website as well as the personal website by clicking on the respective buttons

And what you will see is that an IP address is allotted for your machine and 2 folders are created – 1 within your personal folders and the other at the computer hard disk level.

You should see this screen after you have started both:

A site is created under your personal folder, which can be tested by typing in http://[you ip as shown above]/~[personalfolder]

You will see a default web page that is installed.

Also, you will find another website root available at
/Library/WebServer/Documents.

This is accessible from your web browser by typing just your ip address as shown above or ‘http://localhost/’. You will see a page like this appear.
If that is so, you have enabled your apache web server on mac OS correctly.
Wish you all the best with web site creation!!


No comments:

Post a Comment