Community Documentation

v3 Knowledgebase

How to Turn Your Mac Into a Web local Server

How to Turn Your Mac Into a Web local Server

The first step to web-serving nirvana is turning on your Mac's web serving application. Apple hid the Apache web server in an inconspicuous place in Mac OS X, and they called it Personal Web Sharing. But make no mistake about it -- this little service included with every Mac is powered by some serious software. Apache powers the Internet, and now it's going to power the website hosted on your Mac.

Here's how to turn it on:

1) From the Apple menu, select System Preferences.

2) Click Sharing, and then click the Services tab.

3) Select Personal Web Sharing, and then click the Start button.

4) Personal Web Sharing will turn on. (This could take a minute or two.) After it turns on, note your computer's IP address and URL at the bottom of the Sharing Preferences window. You'll need this later when you test your website.

5) Now that your Mac is accessible to anyone on the Internet -- including hackers and other evil-doers -- you're going to need to protect it. Click the Firewall tab and make sure your Mac's firewall is turned on. Also make sure that the checkbox next to Personal Web Sharing is selected. This will allow people to access your website through your Mac's firewall.

6) Remember those IP addresses and URLs we asked you to save? Type those into your web browser to test your web server. (You can also type "localhost" -- this tells your Mac to look for its own website.) If your web server is working, you'll see one of the web pages below.

7) Close the System Preferences. You've successfully turned on your Mac's web server.

Information taken from