Mac SE/30 Web Server
Written by Gareth Hay   
Tuesday, 01 August 2006
Vintage blogging machine

seSE/30's made very popular servers for a while due to their small footprint, built-in monitor, ability to take very large SCSI disks and the maximum 128MB of RAM capacity.  However, with the demise of AppleShare over LocalTalk, these machines become less attractive as file servers, and many have been decommissioned.  Today, with internal expansion cards available to integrate the SE/30 into a modern network, you could still get some server use out of it.  There are, of course, better machines to use as servers; modern machines specifically built for the task that have massive hard drive capacity, RAM capabilities and computing power.  Yet, believe it or not, an SE/30 will still serve the basic needs of a small time, blogger.

Consider that a small, text based webserver doesn't necessarily need a lot of resources.  it would remain idle a great deal of the time. Things do get more complicated if you need to serve dynamic content, but the only penalty for dynamic content will be speed of serving pages that are limited by the network interface anyway.  Besides all that, it makes for a great conversation piece!


OPERATING SYSTEM CHOICES

When turning your vintage Mac into a server, you have three operating systems to choose from.  The first and easiest is through OS 7.5 using MacHTTP.  For this, you will need either MacTCP or OpenTransport.  Remember that OpenTransport will be RAM intensive and may prevent MacHTTP from running unless you have plenty to spare, so you may want to opt for MacTCP.

Another option is to use A/UX, Apple's version of Unix.  However, this option may provide you with some difficulty as A/UX is hard to find and illegal to distribute.  If you manage to obtain a legal copy, you can run the popular Apache Server, which can be found here.  To enable the networking on A/UX after you install it, go into the command shell and type "new-config".  It will prompt you for networking settings, which in A/UX can't be edited in the network control panels, and ask to reboot.  Configuring Apache should then be like any Apache install.

Third in the list is NetBSD, or a similar variant.  This last option is easily the most tedious.  You must boot into a working Mac partitio, then use an application to launch into NetBSD.  This is not a great idea for a server, as power cuts will stop the server working until you relaunch your *nix variant.  I had originally planned to include Apache under NetBSD in this article, but installing and configuring NetBSD can be complicated and I hope to cover it in another article.


PREPARING AND CONNECTIVITY


Assuming you've taken the System 7.5 route, the next step is to locate some networking software. If you have System 7.5.5 it is likely OpenTransport is installed, and that is all you need.  If you are running an earlier system, you need to get hold of the 'classic networking' tools.  As always, Apple's older software list is the place to look.  There you'll need to download Network Software Installer 1.5 or later.  Again, you could use OpenTransport, but we want to conserve as much RAM as possible.

Make sure your vintage now has an IP address and can communicate with the outside, modern world.  I included a brief primer on this in my last article.  You essentially need to use the MacTCP control panel to assign yourself a class C address.  Also, in order for other computers on your network to communicate, it needs to be in the same subnet as them.  With a Mac using OS X, open the Network control panel, go to the 'built-in ethernet' or 'airport' interface, and under TCP/IP you can see your IP address, subnet mask, and router address.  If you only have a few devices on your home network, add something like "100" to the last part of the IP address.  For instance, 192.168.0.13 becomes 192.168.0.113.  Remember not to go above 254.  Now you can enter all these values into MacTCP on your vintage.  Keep in mind that the 'router address' in OS X equates to the "gateway address" in MacTCP.  Also, the only way to enter a subnet mask is via the 'class' dropdown, and you should have selected "manually" as the 'obtain address' method, setting it on the first page of the control panel.


GETTING AND INSTALLING MACHTTP

If you haven't done so, grab the latest version of MacHTTP.  I used my OS X machine and then transfered it locally to the SE/30 using FTP sharing on OSX and Fetch on the SE/30.  MacHTTP has conflicting documentation about system and hardware requirements, so your milage may vary here.  I successfully installed MacHTTP on an SE/30 with only 8Mb RAM.  Ok, I admit I cheated: I used RAM Doubler too.  When I get around to it, I'll eventually max out the SE/30 with 128Mb.

Installing is as simple as unpacking the archive.  You should get a "MacHTTP" folder containing another folder called "MacHTTP Software and Documentation" that actually contains the executable.  In this directory is the "MacHTTP.config" file that is used to specify all the settings of the webserver in a similar manner to an apache config file.  The file is fully annotated, and needs little altering to start your web server.  Make sure all lines starting with "ALLOW" and "DENY" under the 'security' section begin #. Some installs of MacHTTP come with restrictions in place that prevent you accessing the server.  Double click the MacHTTP application and it should start-up.  You should see a screen like below.

machttp2.6status

Remember the IP address you gave your new server?  Now if you point a web browser to it, you should see the default web page (shown below).  You are now up and running!  Place any html files you like in the MacHTTP directory.  Make sure that the page you want first is called "default.html" and it will load automatically.  Remember, you can server just about any type of file from here; color graphics, css files and even xml.  They are all pre-configured in the MacHTTP.config file to be served correctly.

welcomemachttpscreen


DYNAMIC CONTENT


Of course, static websites are cool but dynamic ones are even cooler!  Inside the "MacHTTP Software and Documentation" folder there is a "tutorials" folder that contains "Extending MacHTTP Scripts".  (Note: Sometimes when accessing the tutorials from the default website, my server beeped and wanted me to 'locate MacHTTP fat'. If this happens, just point it at the running 'MacHTTP' program and all will be fine.)  These are a collection of scripts that use AppleScript to create dynamic content.  As an example, with MacHTTP running, move or copy the file "script1.cgi" to the same folder as MacHTTP, then go back to your browser and go to the website http:///script1.cgi ( is the IP address of your server e.g. 192.168.0.113).  

You should get a lot of lines with various bold text on them, and some without bold.  These are the variables that AppleScript was able to 'see' about the request you made.  In this case, 'method' should be 'get' and 'client_address' should be your IP address.  If you add '?test=someParameter&another=5' to address, after 'script1.cgi' you should see a different output. "http_search_args" now contains 'test=someParameter&another=5', so you have successfully managed to pass data into AppleScript.

There are so many uses here it's impractical to list them all.  The documentation has many examples for you to play with.  If you don't have AppleScript installed, there are still some precompiled applications that work and the .script files, the plain text versions, are there so you can see what is going on. 

You can build pages that return page counts, give the current date and time, or re-spond to parameters, such as a basic search function.  If you need a database type backend there are example stacks to show you how to leverage HyperCard as a CGI application.  Keep in mind that there is a huge performance hit with using HyperCard.  An excelent example of an AppleScript that handles image maps is the early internet, which only had two features: plain text and images.  Some bright guy came up with the idea that, when you click on an image with a link, the coordinates of the click relative to the image are sent back to the server that then decides what to do with them. This enabled people to have an image on their webpage that was divided in the code so that, when you click on different parts, different things happened. Now that browsers are more advanced, they're not so popular.


FINALLY, FAVICONS!

You might like to use something like GraphicConverter to create a favicon.  These are the icons that Safari and other browsers show in their address bar.  Copy any graphic into GraphicConverter and 'Save As…' a "favicon (*.ICO)", call it "favi-con.ico" and put it in the same folder as MacHTTP.  This will also stop the errors you get all the time from Safari looking for it! I used the MacHTTP icon from the default webpage.

untitled4

If everything went right, you should have your vintage Mac running as your server. Enjoy!





Comments (1)
23-01-2008 00:53
 
NetBSD and A/UX are not your only other choice. Our family has had an SE/30 running Linux for some time now. It should run any flavor of *NIX that has a version for the 68k processors. There is a good tutorial for getting Debian working here: http://www.jagshouse.com/Linuxm68k.html
Registered
 

Write Comment

Name:
Comment:

Code:* Code
I wish to be contacted by email regarding additional comments



 
< Prev