

If your computer is connected through a router, you may need to consult the manual that came with it to enable port forwarding a facility that allows your Apache web server to send data to the internet via the router. This part of the tutorial assumes that your computer is connected directly to the internet and isn't behind a firewall or connected using a network hub or DSL router. Now you've got your web server set up, you need to give people an address to visit your web site. Give yourself a pat on the back, you have now established a web server! However, you are not quite done yet. You should now see your web pages instead of the default Apache one. When you've put your own HTML and image files into the /Library/WebServer/Documents/ folder, go back to localhost in your browser and refresh the page. You can delete these files (or put them somewhere else if you want) and you'll then be ready to put your own web pages in this folder. These files are used in the default Apache page you just viewed. You should see a group of HTML and image files including one called index.html. To do this, open a Finder window and go to /Library/WebServer/Documents/.


Naturally, you don't want people to see the default homepage when they go to your web site, you want them to see your own web page. It means that Apache is configured and working correctly and that you're ready to put your site up! You should see a page that says something along the lines of "Seeing this instead of the website you expected?" This message is the default page that the Apache web server will show when it's first installed. Open a web browser - like Safari - and type in localhost in the address bar. The Apache web server should now be running and will automatically start everytime your computer boots unless you change the settings in the System Preferences.īecause Apache runs as a background service or daemon and not a normal application, it won't appear as an item in the Dock when it's running. Under the Services tab, check Personal Web Sharing or select it and click Start.

To begin, open Applications > System Preferences (look for it in the Dock) and go to the Sharing pane. The reason for this is that Mac OS X is shipped with the powerful and widely used Apache web server software built right in. Using Mac OS X as a web server is easier than you might think. 4.3 Can't access your website from the internet.4.2 Can't access your site from your own computer.3 Giving others access to your web site.
