Ordinarily, the thought of asking my mother to take a few pictures using the digital camera, zipping them into an archive, firing up a mail client and emailing the file over, would have been followed by the visualization of a long-drawn tutorial phone conversation that perhaps would never see the said task list brought to fruition. Don’t get me wrong, my mom is as enthusiastic as can be when asked to send me some pictures over the internet, but when the process involves anything more than switching three applications and a dozen clicks of the mouse, I know my mom’s no longer part of the audience.
To a geek like me, the process of say, setting up a simple web server is no big deal. I’ve done it many times before, on Windows of course. You begin with installing the latest apache httpd web server… oh wait, did I lose you as well? So you see the point. Every person who owns a computer would like to see it being used for so many applications, that are simply beyond reach - a majority of people end up purchasing computing power that vastly exceeds their needs. If only it were a bit more simple.
I got my mom to set up a web server yesterday. Yes, she is a web administrator now - it just took a couple of clicks, thanks to the Mac. I’ve always admired the power in the simplicity of Mac OS X, but today I’m a much bigger fan - for they’ve bundled an apache web server distribution with the OS.
All you need to do on a Mac, is this:
- Pull up System Preferences (via the dock or the Apple menu (top left))
- Click on Sharing, under Internet and Network
- Check the Personal Web Sharing item under Services
- Importantly, check the Firewall tab and make sure the built-in firewall is turned on - and that Personal Web Sharing option is checked
- Close the System Preferences window
Thats it. You’re done. Your Mac is now running a personal web server. To check if its working correctly, fire up a web browser window and point it to the URL mentioned when you select the Personal Web Sharing option under System Preferences, which looks like this (see screenshot below):
View this computer’s website at http://192.168.1.2/ or your personal website at http://192.168.1.2/~aidoor/
You can even type in http://localhost/ at the same machine to check. To access your web server from any other machine on the internet, you will need the ISP-assigned IP address similar to the one in the note above. The easiest way to find your IP address is to visit http://www.whatismyip.com.
If things are set up correctly, your browser should bring up the default Apache index page. You can now build a website by designing and placing html files in a specific folder - under your main drive, select Library > WebServer > Documents
Each user account on your Mac also gets a personal folder for web sharing as well - for this you need to put your html files in the Sites folder located in the user’s Home folder. The URL for each user’s web account looks like http://your.IP.addr.ess/~username
The next step would be to register for a domain name using one of the many registry services on the internet (I use GoDaddy), so you can have a nice name to give out to people, instead of a 12 digit number.
Unbelievably simple. My mom loves it.
(Screenshot of System Preferences window)