Don't Discard That Rotten Apple --;
Make It an Internet Server, Part I
© 2000 Richard S. Sternberg
Washington Apple Pi Journal, May/June 2000, pp.
25-30, reprint
information
When my ten year old returned from summer camp knowing
how to make a Web page, I decided that, I, too, could create
my own Web site. Though I haven't programmed anything larger
than a calculator since around 1978, I realized, after a
little more thought and a skillful assist from friends on
the TCS, that I had just about everything I needed to create
and manage a complete multihosted Web and mail server for
almost an unlimited number of Web sites of unlimited size
and to host unlimited email accounts sufficient for a
medium-sized law office as well as my family's use. As a
challenge for the winter holiday season, I decided to prove
that I could accomplish all of this for free. I missed by
$129, and that's because I got lazy.
More and more people and businesses want or need their
own Web sites --; Web sites they can control. Business
owners and individuals who want to make themselves easier to
find want their Web sites to be something in their own name.
More of these people are getting connected to the Internet
24 hours a day, seven days a week with more affordable,
high-speed connections. And more people find that they have
old, unused, Ethernet-capable Macs that are too old and slow
to be useful in a modern office, but aren't ready for the
scrap heap. If you are one of those people, all of the
ingredients are there for you to create and control your own
Web presence.
This will be the first of two articles on how to save an
old Macintosh from scrap and use freeware or cheap shareware
to set up a single-line multihosted Web server for unlimited
hosts and domains. In this segment, we'll talk about how to
use freeware and widely available non-specialized Web
authoring tools to create a Web page even your child could
make, and, we'll cover registering your domain names, so you
can pick your names and decide what your piece of cyberspace
ought to look like. We'll also discuss the minimum hardware
requirements so you can decide if the project interests you.
Next issue, we'll use freeware to make a ploddingly slow
680x0 series computer host a rather adequate small business
or personal Web server and email server. We'll conclude by
discussing the creation of your own domain name server (DNS)
so that all Internet middlemen between you and your
customers --; or your friends and family --; fall out of the
picture. Sadly, I haven't completed the domain name server
yet. If that project fails, this end product may still cost
a small annual fee for secondary hosting from a commercial
Internet service provider (ISP), but that's still better
than outside services.
The objective is to demonstrate that you can control your
interface with the Internet using little more than scrap
silicon and freeware. And if a lawyer can do this as a
winter holiday project, it can't be too impossible --;--;
Minimum Requirements
The key to this miracle is Apple's Open Transport 1.3,
which is included as part of Mac OS 8. While most of the
documentation suggests that the servers can run on System
7.5.3 and later and some earlier versions of Open Transport,
I can only verify that it works with Mac OS 8.1 (you might
recall that the earlier releases of OS 8 suffered from some
reliability issues) and Open Transport 1.3. The magic you
need from Open Transport is its facility for using the Mac's
hidden ability to perform single-line multihosting. In a
Wintel or Linux server, you'd need multiple Ethernet cards
and controllers along with complex routing tables, filters,
and rules individually programmed to route information to
serve multiple domains; the magic word "multihosting" allows
that to become remarkably simple on a Mac. But the term "or
later" may be limited: Apple has indicated that single-line
multihosting capacity may be excluded from the new OS X. My
Centris 610 may be a better Web server than its much, much
later and faster descendents.
You will also need at least one fixed IP address. While
that address need not be on-line all the time, it will be
easier to complete --; and it makes much more sense for a
Web server --; if it is. An Internet Protocol, IP address,
is a set of four numbers in the approximate form
216.50.13.164, which is the primary IP address of my host.
The need for a fixed IP address means that you could not use
your TCS account as a router to your internet servers,
because the TCS, like almost all dial-up systems and some
other protocols, assigns a variable IP address to you when
you sign into the TCS servers.
This implies another requirement: your machine must be
able to use Ethernet. Unlike other platforms, you will need
only one machine and only one IP address to serve as many
domains or secondary IP addresses as your memory allows. I
experience no recognizable service deterioration serving
five IP addresses and eight domains, plus email service, on
my low volume site. Most of the information you may read
about server abilities is written by programmers, whose
experience is in preparing for major site traffic or ISP
servers; real small business or personal use internet
servers don't seem to be able to approach the traffic volume
that can slow my ancient, war-weary Centris. Converting my
non-Ethernet-ready Centris 610 required some swapping with
another Ethernet-ready Centris 610 and a $35 Ethernet
adapter, but most creative people ought to be able to find a
relatively free source for a scrapped Ethernet-ready
machine.
It is probably a good idea to use a machine with a good
complement of memory. The servers we'll be using run much
better if virtual memory is turned off. An original
equipment supply of four or eight megabytes may cause
problems, but you need not fill the machine as you might
today. The 44 megabytes already in my Centris work just
fine.
Finally, the documentation for most of the server
software I used says they require at least a 68020
processor, as in the original Mac LC, but, as a practical
matter, the price and availability difference between a
680LC40 or PowerMac 6100 and an LC is insignificant, and
Social Engineering, the publisher of the Web server we'll be
using, states that its Web server will run significantly
faster on a 6100.
Objectives and Terminology
Your objectives should probably include setting up
multiple domains to serve Web pages and email. If all you
want is a simple, single Web domain, the effort involved in
this project is probably not worthwhile when commercial
Internet Service Providers (ISPs) charge as little as $7.95
per month to host your domain name, and they provide
rudimentary email service and five megs of Web space. If you
don't insist on having your own domain name, that is,
something like
www.SternbergLaw.Net,
free Web hosting is widely available. This set of articles
is only worthwhile if you want to host multiple Web sites.
We need to discuss some terminology before proceeding,
even though that's not as fun as making a server. It
essential to use consistent terms to understand what are
otherwise reasonably easy concepts, but none of the major
commercial or shareware publishers use the terms
consistently. This article adopts the definitions used by
Andreas Pardeike, author of a wonderful Web server plug-in
named Welcome, not only because his technical support,
pricing, and product are superior, but because everyone
else's usage of these terms, specifically including Apple
and Social Engineering, is inconsistent and not helpful.
Indeed, even if you don't use Mr. Pardeike's Web server
plug-in, Welcome, for virtual multihosting, statistics, or
rules and routing, his Web manual was key in my
understanding of basic concepts necessary for this project.
You can download the Welcome manual and plug-in at
http://welcome.pardeike.net.
Domain: A domain is a name registered in the
InterNIC naming system for you. SternbergLaw.Net is a
domain, of which www.SternbergLaw.Net
is a host name (name or alias of a particular machine). By
registering your domain with the InterNIC, computers
connected to the Internet anywhere can be directed to any
information you are providing under that name and to the
host computer on which that information is stored.
Host: A host is a computer on the Internet
offering some service (such as a Web site). While often used
as a synonym for domain, because the role of the domain
naming system (DNS) is to link hosts and domains, it is much
more precise to use the word host when referring to the
computer performing Web, email, or other Internet services,
and domain when referring to the domain when referring to
the Web, email, or other Internet service.
IP Address: An IP (Internet Protocol) Address is
the unique numeric address of a machine on the Internet.
Since computers speak in numbers and most people speak much
better in words and names, the domain naming system was
created to perform the arduous task of converting the unique
numeric addresses used by computers into unique words and
names used by people, and vice versa.
DNS: A DNS is both a reference to the Domain
Naming System and to a computer protocol that provides
domain naming system services
Multihosting: Multihosting is the art of cleverly
using a single computer to respond as if it were several
separate computers, each with their own unique host name.
Multihosting might be the most frequently misdefined term in
modern computing. I have seen it named IP Aliasing,
Secondary IP Address Support, IP Masquerading, Multihoming,
and IP Multinode Support. Multihosting is the ability of one
computer to act as a host for more than one domain.
Virtual Hosting: Virtual hosting performs the
trick of multihosting by allowing the DNS to "advertise"
multiple host names for a single machine. The host names are
registered in the InterNIC DNS as all appearing at the same
IP address. Since nothing in the DNS rules prevents more
than one host name from being pointed at a single IP
address, this is permitted. The host is provided with some
method of distinguishing between the host names when
requests come to its IP address. This trick has the
disadvantage that the DNS will fail to work when providing a
reverse lookup. Because it can only return one host name, it
will return the primary host name listed in the DNS for that
IP address. This prevents some secure services from being
used on a virtual domain.
Single-line Multihosting: Single-line multihosting
performs the trick of multihosting by enabling the host to
answer multiple IP addresses using a single Ethernet card
and line to the Internet. Each host name has its own IP
address.
I chose to set up my Web server as a single-line
multihosted server. I had no article like this to help me. I
was worried about incompatibility problems. I decided I
could always add virtual hosts to my system after I use up
all of the available IP addresses, but I wanted to keep this
as simple as possible. If you only have access to limited IP
addresses, or if you can't get single-line multihosting
software like I did, or if you don't care about how you
multihost, or if you don't want to go through the hassle of
unlocking your Mac's single-line multihosting potential,
virtual hosting may be a better choice for you.
Let's get registered!
Registering a domain name is shockingly easy, as some of
the recent advertisements have suggested. There are four
companies that provide easy name checking and either
reservation or registration. The original was the InterNIC
found at http://www.nic.com/,
but there are others at http://www.register.com/
and many other places. Until recently, your ISP could
register the address for you, and send your payment later,
but NIC now wants its payment up front and my ISP, at least,
declined to bill me. The price for a domain name in the
.com, .org or .net range is $70 for two years, conveniently
payable by secure connection with a credit card. The sites
are all quite self-explanatory, and I'd suggest you go there
yourself, rather than going through an ISP, if only because
you can check all the names you ever considered to see if
they're available, as shown in one recent television
commercial.
|
Figure 1: One of the many sites which can
help you register your domain name.
|
Note that Register.com offers domains that end in .md.
For medical doctors only --; supposedly --; but the Internet
is a flashback to the Wild West when it comes to rules. I
can't imagine in that environment that there'd be much
enforcement, anyway. Folks from Maryland therefore might
consider that the country of Moldavia is selling its
assigned domain names to Americans --; supposedly to medical
doctors. Moldavia has been assigned the suffix .MD. I don't
know the details regarding price and registration, but it
isn't hard to find. I did not obtain a .MD address, because
the consensus in my family was that a domain like
Sternberg.MD would confuse people and would not be
associated by most people with "the Sternbergs of Maryland."
If I was Montgomery County, however, I'd forget about that
.gov stuff and snap up Montgomery.MD.
Before you can register your selections, you will need
information like the name and registration information of
the responsible party. Once you've completed creating all of
the servers to be described in this series of articles,
you'll be able to be your own responsible party, but in the
meantime, you have a few choices:
- wait until you're done setting up everything, and
then register and hope everything actually works
without prior testing;
- reserve the name for an additional cost while you
get everything arranged so nobody steals your favorite
name (I actually lost my first choice --; after
considering this project for nine months --; by half a
day after I sent in the order to register to my ISP,
and I've been told that some of the registration sites
sell name request inquiries to "entrepreneurs" who
reserve and try to re-sell the names);
- get the registration information from your current
ISP or a temporary hosting site and "park" the domain
name(s) until your Web server is working, while
designing and testing your Web site designs from their
host in the meantime. Registration rules assign the
domain to you, and you can transfer the domain when
you wish. Services like minimal hosting can cost as
little as $7.95 per month per site, or $49 per year
for secondary Web hosting, which merely points your
domain name to a host elsewhere.
Creating your site
So much has been written about top-of-the-line Web
authoring software, that I was petrified about creating my
own site more than about creating a server --; until my ten
year old returned from a day of summer camp with a basic
explanation of how to craft a Web site. Still, all my
friends --; and all the pros --; united to tell me the job
of writing a simple site could not be accomplished without
software packages ranging in price from $129 to $350. Since
the cost of a commercial Web authoring package seems
impractical, especially if one considers the drafting time
and the risk of failing and having to hire a professional
anyway, I refused to purchase a Web authoring tool.
I didn't have to. I already owned the tool that became my
second favorite Web drafting software, Microsoft Word '98.
My first choice, Netscape Composer, which is included in
Netscape Communicator, is free. If you merely want to post a
résumé or brochure or many things you can
write or present in Word, try using the "Save as HTML"
command in the File menu, and then open the resulting
document in Composer. Or, open your favorite Web site in
Communicator, and, so long as you comply with applicable
copyright laws, save the results as a file on your drive.
Or, use one of the many, many models provided with Word.
Be ready to say "Shazam!"
I'm busy posting basic résumés or practice
descriptions of attorneys with whom I work as fast as I can
get the attorneys to send them to me in electronic form.
Creating each new Web page now takes me a few minutes.
This is much easier than anyone wants to tell you. At the
very least, you will learn that the qualities you are
seeking in a good Web page designer are not programming
skills. With the automation of html language writing, any
average fourth grader can master a sufficient level of html
authoring. For better-designed sites, you are looking for
page layout and creative design skills, rather than
programming skills.
Setting up Open Transport for Single-line
Multihosting
If you have an old System 7 Mac, your first step will be
to upgrade it to Mac OS 8, unless you wish to brave new
ground and try this under System 7. Even with pre-Mac OS 8
machines, multihosting can supposedly be achieved with Open
Transport and cheap shareware products like IPNetRouter. And
it is fairly easy to tell whether you've successfully
unlocked multihosting by pinging it. You won't be able to
bring some older Macs past OS 8.1, but 8.1 will do fine.
Before you upgrade your Mac to Mac OS 8, reformat your
drive, then strip everything off the machine which isn't
discussed in this article other than a spare copy of
Netscape Navigator. The server we are going to be creating
will not be fully secure, but it will be more secure and
much more competent than Apple (or Windows) Personal Web
Sharing. While there are no known security holes that could
be used to affect your applications or data, why take
chances? Erase all prior data and reformat the drive. If
that sounds too time-consuming or troublesome, don't bother.
Now, clean install Mac OS 8.1, or, Mac OS 8, as I did.
Upgrading to 8.1 is free from Apple at http://asu.info.apple.com/swupdates.nsf/artnum/n10491).
I strongly recommend a clean install of the operating
system. While you're installing, leave out Apple's Personal
Web Sharing, or turn its extension and control panel off
using Extensions Manager after the installation, and restart
the computer; Personal Web Sharing, if left on, may seize
Web serving port 80, leaving it unavailable for the new Web
server, and Personal Web Sharing is reported to be immensely
slower, incapable of multihosting, and problematic.
Keep a copy of a small version Netscape Navigator that
will run on the Web server, so you'll have easier access to
the Web from the server to retrieve missing files and
software during the installations. But, if you can't find
Netscape Navigator because, like me, you deleted it when you
wiped your hard drive clean, "don't worry, be happy." I
threw out my ancient version of Netscape Navigator, and my
server is working fine.
You must now tell the computer to use the IP address. For
testing purposes before you go on-line, you may wish to set
up a private network with another computer away from the
Internet, but this isn't mandatory. To create a private
network inaccessible to the world between two Ethernet
connected Macs, just supply each with IP addresses which are
perfectly acceptable locally, but which are improper in the
Internet naming conventions. The IP address 192.168.2.nnn is
commonly used for this in text books, and I suggest you use
the first three segments for testing, but insert your future
actual IP address for the nnn segment. Later, it will be
easy to make the changes that'll put you on line. Call your
ISP and get the IP addresses you'll be assigned for your
server. As an aside, an IP address can be used for many
things, so don't ask your ISP the wrong question when
seeking an IP. Your ISP won't know what IPs you have for
your server; they won't even know you have a server, and
they may get confused and give you the IP address for the
server you are using on their host. You want to know what IP
addresses are assigned to you. For example, we have the
series from 216.50.13.160 to 216.50.13.192, which our ISP
assigned to us assuming we were going to put PCs on all but
the first two addresses. Our available IP addresses are any
in that series, except the first two. I chose to "locate" my
Internet hosts at 216.50.13.164 through 216.50.13.168.
Open the TCP/IP control panel.
|
Fig. 2: The TCP/IP control panel, set to
test the address 192.168.2.164.
|
Yours will probably connect via Ethernet, rather than
Alternate Ethernet (see Fig. 2), but you want to insert your
primary host address, or your test address, in the IP
Address. Use this submask for testing, but eventually switch
to the data provided by your ISP for IP Address, Subnet
mask, Router, and Name servers. You may list your domain
names as I have under Additional search domains, since this
will help internal searches from your machine, but it is
optional and not worth the discussion time in a novice
article.
If you want to single-line multihost, you must create a
new file called "IP Secondary Addresses" using a text-only
editor, like the free SimpleText which comes with all Apple
systems. The file name is critical, and is exactly as
written without the quotation marks. The file, which must be
saved as a text file and placed in the Preferences folder
inside the System Folder is extremely important and must be
perfect. Simply list each additional IP address after the
primary address. The text after the semicolons in my example
are merely comments and are ignored by the system).
Fig.3: My IP Secondary Addresses file during
testing; addresses later changed to 216.50.13.nnn
;Put in Preferences Folder
;Opens Open Transport 1.3 capability to use
multihoming, a.ka.,
; IP Aliasing, Secondary IP address Support, IP
Masquerading,
; "Multihoming", IP Multinode support
;See Apple Notes at
http://til.info.apple.com/techinfo.nsf/artnum/n30337
;List each secondary IP address, with optional sm
and rt variables
;In this example, 192.168.2.164, the number before
the secondary
; addresses,would be the primary IP address set in
TCP/IP control panel
ip=192.168.2.165
ip=192.168.2.166
ip=192.168.2.167
ip=192.168.2.168
|
After you close and save this file properly, restart your
computer. To test if its working, go to another machine on
the same private network, or, if you started on the Internet
using a legal IP address routed by your ISP to you, you
should be able to ping the machine using a common freeware
utility like MacPing, Mac TCP Watcher, or IPNetMonitor. A
variety of Mac-based web tools can be found at:
http://www.nisto.com/mac/tool/servers.html
http://www.macresource.com/mrp/software/lists/internet.shtml
or at
http://www.tucows.com
by selecting Macintosh and doing a search for "Internet".
You should now be single-line multihoming. For now, your
machine is all dressed up with no place to go. But, next
issue, after you've had time to design your Web pages, pick
and register some domain names, find and set up an old Mac
for multihosting, and think about whether you want to
single-line multihost or virtual multihost, we'll go on to
set up the Web and email servers.
In the meantime, if you want to read this article in a
Web-savvy form, with active hyperlinks to all of the sites
listed, "visit" me at http://www.RSSternberg.org/Multihost.html.
|