oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Homemade Dot-Mac with OS X
Pages: 1, 2, 3

Setting up the Client

Go to the Network Preferences Pane and make sure your network connection is set to DHCP so that your ISP will properly assign you an IP address.

A Note About Firewalls/Routers: If your Internet connection travels though Firewall software or a Router, you may experience some trouble accessing your computer. Make sure it is set to accept inbound connections to port 80 (the default for HTTP requests). If you are using a cable/DSL router, make sure you've properly set up port forwarding (check your router's manual for instructions). Still having trouble? Check if your ISP blocks inbound connections to port 80 (some have done this because of Internet worms). If this affects you, set up your HTTP server on a different port (for example, 8080).

Now, if you've made your donation, and followed the DynDNS instructions to create your account, you need to add this account information to the Mac Dynamic DNS application. It has an easy-to-follow "wizard" that will walk you through creating the client account. Set this as your master account, turn the account on, and click "Check Now" to update your IP address with the DynDNS service. When it has communicated with the service, it will show your current IP address in the window. Don't forget to set the application's preferences to automatically update the address!

Screen shot.
The agraham999 account is on, displays my IP, and the last time it was checked. Your IP address will hopefully look different. You can click "Check Now" to have it override the schedule.

Because I don't know how often my DSL provider updates my IP, I've set the Dynamic DNS application to check my connection every 15 minutes, and notify of any changes.

Important Note: Be sure that you set this application (and its background application) to launch at startup via the Login Preferences Pane.

Step 3. Starting Up Your Server

Now, go to the Network Preferences Pane and check that your computer's IP address is the same number that's listed in the Dynamic DNS application. If so, your computer is properly communicating with the DynDNS site. I can't stress how important it is that your router isn't assigning an internal IP address without proper Port Mapping.

Next, head over to the Sharing Preferences Pane. If Web Sharing is off, turn it on. If you would also like to have ftp access to your computer (I'll cover this later) enable it here.

Important Tips: While you can allow your display and HD to go to sleep, it is important to keep your entire system from going down. In the Energy Saver Preferences Pane, be sure to set "put system to sleep," to never. You should also tell the computer to restart after a power failure. One last item, you need to be sure that Login will automatically log a user in to ensure the server and Dynamic DNS software will start up. If you are concerned about security, create a auto-login account with a name like "server" that will run your Web server, but won't give anyone access to your administration or other accounts. You can always log out of this account and log back in as yourself.

Screen shot.
If the machine goes to sleep or there is a power failure, you could be up "that creek" without a paddle.

Step 4. Testing 1..2..3... Can I Get a Level?

OK, here is where we find out if you have everything set up properly. Open up a Web browser and type in your DynDNS Domain Name ( or whatever) and hit return. You should see this logo on a Web page:

Apache logo.

Congrats! Your Web server is up and running.

Mac OS X Pocket Reference

Related Reading

Mac OS X Pocket Reference
A User's Guide to Mac OS X
By Chuck Toporek

Step 5. Mirror Your Settings

If your computer has multiple users with separate accounts, you need to make the same settings across each account to ensure that when people log into their account, the server will remain running. Also, be sure the DNS client launches on login to each account.


Let's recap. We've set up our basic Web server and tested it to see that it works. We can now host our own Web pages and databases on our home computer. We can also set up our own version of iDisk, which is limited only by the storage space on our HD. In future articles, we'll complete our .Mac clone and start using it. You know what they say, "When Apple closes a door, just start looking for the window."

In Part 2, we'll add our own Web site, set upand move our own domain name, setup a Firewall, create our own version of iDisk, learn FTP, and launch our Web site.

Alan Graham is the creator of the Best of Blogs book series and is a frequent writer on the O'Reilly Network.

Return to Mac DevCenter.