Setting up a simple Web server

The Mac provides an extremely simple way to turn your computer into a Web server. For this tutorial, we'll assume two things: 1) you're not on a LAN, but you connect to the Internet via a dial-up to your ISP; and 2) you only want a Web page temporarily, for instance, if you want to send a graphically exciting party invitation without crashing your friends' e-mail.

The first thing to do, obviously, is to create your Web page. If you want to create multiple Web pages, make sure they are all in the same folder, and choose one of them to be your start page - the first one people will see.

In Mac OS 9, your Web server is extremely easy to operate. First, connect to the Internet. Then, open up the Web Sharing control panel and click on the Start button where it says Web Sharing Off. After a bit of whirring, this will change to Web Sharing On and the button will read Stop.

You'll also notice that where it says My Address: there is a number something like This is your computer's IP address.

Next, use the two buttons marked Select to find the Web page(s) you created (the top button to find the folder they're in, the bottom button to choose which one gets viewed first). They can be anywhere on your hard drive, but it's good housekeeping to put them in the Web Pages folder inside the Documents folder.

Next, start your Web browser and point it at the address shown in the Web Sharing control panel (e.g., Congratulations, your page is live! Send your friends an e-mail telling them the address of your Web site.

A word of warning: since your IP address is provided by your ISP each time you dial up, it is very likely to be different next time you connect. So tell your friends to check out your Web page straight away, or be prepared to send another e-mail every time the address changes.

In Mac OS X look under System Preferences and click on the Sharing pane. It's quite similar to the Web Sharing control panel from OS 9. The difference is that, whereas OS 9's personal Web server has limitations in terms of the number of simultaneous connections it can handle and how efficiently it performs Web serving requests, Mac OS X's personal Web server is Apache, the UNIX-based powerhouse that runs over 60 per cent of the Web sites in the world.

The brilliant thing Apple has done with OS X is to make Apache as easy to use as Mac OS 9's control panel. As above, you simply connect to the Net, then open this pane and click on Start where it says Web Sharing Off. Almost immediately, your Apache Web server is up and running.

Note that, if you're connecting via an ISP, your IP address may not appear in the Sharing pane where it says IP Address. If this is the case, click on the Edit button to bring up the Network pane. Your IP address will appear there. Point your browser at this address, and you'll see a page telling you "this site is powered by Apache".

The tricky bit with OS X's Web Sharing is that your Web pages can't be just anywhere on your drive - OS X is more of a stickler for housekeeping. You have a choice. First, you can put your Web page(s) in the Documents folder, located inside the WebServer folder which, in turn, is inside the Library folder on your hard drive. This is the default place where OS X looks for Web documents. If you choose this option, your friends should simply be directed to your IP address (, for instance).

Your other option is to put your Web pages inside the Sites folder located inside your Home folder. If you choose this option, then the address to tell your friends is (using the above IP address as an example) where username means the short version of your OS X login name (mjcp as opposed to Matthew JC. Powell, for example). And don't forget the slash (/) at the end. If multiple users access your Mac and all want to host Web pages, this is the best option.

Join the PC World newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Matthew JC. Powell

Show Comments

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Matthew Stivala

HP OfficeJet 250 Mobile Printer

The HP OfficeJet 250 Mobile Printer is a great device that fits perfectly into my fast paced and mobile lifestyle. My first impression of the printer itself was how incredibly compact and sleek the device was.

Armand Abogado

HP OfficeJet 250 Mobile Printer

Wireless printing from my iPhone was also a handy feature, the whole experience was quick and seamless with no setup requirements - accessed through the default iOS printing menu options.

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?