First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.
Setting up a simple Web server
- — 06 September, 2001 16:06
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 184.108.40.206. 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., http://220.127.116.11). 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 (http://18.104.22.168, 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) http://22.214.171.124/~username/ 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.