Articles Archive
Articles Search
Director Wiki
 

DIY Web serving

September 25, 1997
by Alex Zavatone

A recent question on the ShockeR list asks "When I am developing shockwave, how do I avoid FTPing my movies up to the web to test them every time I make a change?" The answer is to set up a local server on your Mac using OS 8.

There is a basic method of setting up the local web server and a further strategy to simulate a 28.8 modem.

To start, you must install OS/8 on your mac (sorry pc users) and make sure that you install the web sharing extension. After the install, reboot and select the Web Sharing control panel. From the control panel, you can select your root directory that contains the files that you want to view in your browser. The default view is displayed below:



Now the concept is to create a staging area where your web content resides. From your Web Sharing control panel, you select that staging area as your web folder. Create a bookmark in your browser and then either select the bookmark or reload the page to see your changes. To make sure that your browser always loads the content rather than the cached version, you can set your browser's cache size to zero, and/or set the network options to "check every time." Also, don't forget to learn your browser's shortcut to force the page or items to load. This should guarantee that you always see the latest version of your work. Your page could be local, or, to degrade performance (or when working as a group), you can place it on a local file server. The caveat to placing it on a server is that you must be logged on to that server when you are running the web sharing from your machine.

The other part to this is getting a valid TCP/IP address for your machine. If you are on an ethernet network, you probably already have a valid TCP/IP address. If you do not have a valid address, then make sure you are not on your modem or are hooked up to your network where a hand entered TCP/IP address could cause conflicts.

To proceed, open your TCP/IP control panel and press command - k to open your TCP/IP Settings. You should be presented with the following screen:

Duplicate your current configuration and call it something like "Web Server". Click on the "Make Active" button to change your TCP/IP config. Look at the screen below and change your settings to those below. Note that your name server settings are not important and can be ignored.


Save your settings and note that now you can switch between TCP/IP configs by opening the TCP/IP control panel, pressing command - k and switching back and forth. Close the control panel and save or agree to any dialogs that may appear.

Before you turn on Web sharing, there is one more change you need to make or you will not be able to serve Shockwave files. The server MIME types preferences file needs to be configured for Director 4, 5 and 6 shockwaves. No change is required to serve SWA files. Do a file search for a file with the name of " Web Sharing MIME Types". It should be well nested within the System:preferences:Web sharing folder. Open that file and add the following lines in the MIME type declaration.

* 'MD93' * application x-director

* 'MD95' * application x-director

* 'MD97' * application x-director

Save that file and turn on web sharing from the Web Sharing Control panel. After it starts up, launch your browser and enter your TCP/IP address as displayed below:

If all goes well, your root web folder should load and then you can go about surfing and serving your local shockwaves through a real HTTP server.

The files are served on my 8500/150 from 12 to 80 KPS. If you wish to slow down performance to modem levels, you can always place your web server on slow media. I have LocalTalk cables hooked up to a 6100 for just that purpose. In my test case, I'll ethernet the files over to the 6100 running web sharing and then serve them back over LocalTalk.

A Director user since 1987, Alex (Zav) Zavatone has worked on the engineering teams for both Director and Shockwave, 4, 5, 6 and 7. Recent investigations find him developing foundation classes for Director with asynchronous process management and other life threatening activities. In its early days, he had something to do with this Internet thing known as "DOUG". A noted ne'erdowell, slacker and laggard, Mr. Zavatone is nonetheless is trusted by children, small animals and the elderly. In his spare time, Mr. Zavatone rehabilitates lame desert trout.

Copyright 1997-2017, Director Online. Article content copyright by respective authors.