image rss

Bryan's Tips and Tricks

Enable the Basic (Apache) Web Server in Leopard (Mac OS X 10.5.2 Leopard)

I'm a web designer/programmer and live a little dangerously by editing my websites directly on the web server. I do the editing on my local machine, but usually I just immediately upload and view the changes online. Some would call the reckless, but so far so good.

Lately though, I've been traveling to Fort Myers a lot and sometimes I don't have internet access or it is intermittent at best. So...I have developed a need to be able to edit and preview my files locally and be fairly confident of what the final rendered page will look like once I upload it to my hosted server.

The Mac is great for this because both the apache web server and php are built in to OS X (Leopard). Today I'm going to show you how to enable the Web Server (For Basic HTML and CSS). Watch for another posting to see how to turn on the PHP Server.


Enabling the Web Server is child's play.

Here's How:

Open System Preferences (Located in your Applications Folder.)

Click on the "Sharing" icon.

If "Web Sharing" is already checked off, you don't need to do anything. If it is not, just check it off.

If "Web Sharing" is grayed out, you may need to click on the lock in the bottom left corner of the Window and Authenticate.

Once you have it enabled, it will give you the address for your computer. Now, all you need to do is place your Website in the "Sites" Folder located in your "Home" Folder.

Once you've placed your site in the appropriate folder, navigate to it using the address listed in the "Sharing - Web Sharing" System Preference Pane. You will want to use the address that looks something like : http://10.0.1.150/~username/.

Sharing Pane

The "Sharing Pane" within "System Preferences"

Now use your common sense and figure out your specific settings.

For Example: The address to this page on my computer is : http://10.0.1.152/~brygruver/billabonger/enableweb.html (I actually use .php but you get the idea.)

Questions, Comments, Corrections or Suggestions? Send them to us at tips@billabonger.net

image

Made on a Mac. Written using Coda. Designed using Web Standards. Tested with FireFox.

If you're using Internet Explorer 6, stop now and download either Firefox, Safari, or IE7.

Internet Explorer 6 is 7 years old, upgrade.