Installing HTTPD under VMS

Under VMS

The daemon runs just as under unix, for which the rest of the documentation was written. These instructions are my ideas about how to run it under VMS but it is a long time since I did anything like this, so please tell me what is wrong. We don't have effort available to distribute HTTPD.EXE, sorry.

Compilation of the daemon for VMS requires taking the library and Daemon source files from the unix release, copying them all onto the VMS system, compiling them all. The object files from the Library should go into a libwww.olb file. The object files from the Daemon should be linked together and with the libwww.olb library.

But check out what Mark Donszelmann has done.

When compiling the sources, you must use a compiler flag to specify whether you have Multinet, UCX or Wollongong TCP/IP. (cf rebuilding the line mode browser ). The flags should be one of:

		/DEF=MULTINET
		/DEF=WIN_TCP
		/DEF=UCX

Running


The daemon works with document names which look like unix-style filenames. At the point of reading a file, these are converted into VMS style filenames.

Testing it

Suppose you have compiled and linked httpd successfully. You write a "welcome.html" file as an introduction to your server for those from outside, and you put it in some suitable directory which you wish to export, say sys$disk[my.public]welcome.html

You run it as an ordinary user on a port over 1024 from a terminal window.

		httpd == $sys$disk:[my.directory]httpd.exe
		httpd -p 8000 -v "/sys$disk/my/public"

Note that the directory to be exported is given in unix style. Don't panic. Watch the trace (enabled by the -v option) . The server should end up waiting for a message.

From another terminal window, you test the server, giving the internet node name of your machine in place if mynode.dom.ain and the same port number. We assume you have the lin mode browser installed. You could test it with a GUI browser, but the trace might be more difficult to find.

		www -v "http://mynode.dom.ain:8000/welcome.html"

You should now get your welcome page displayed on the terminal. theer will be a lot of trace as well which may make it almost unreadable, but if it works of course you run both server and/or client next time without the -v.

Installing properly.

Check whwther your TCP/IP brand contains an inetd daemon. If it does, that is great, you just run it under the inetd daemon following the manufacturer's instructions. Set the daemon up to run on any TCP connection to port 80. (The service name for port 80 is http).In this case the only command line parameter which you will need to pass to httpd is the directory name. Omit the port number to tell httpd that it is running under the inet daemon. If you find that this daemon is too slow (very possible under VMS), then switch to using the method below.

If you don't have an Inet daemon, then you have to run the daemon as a detached process. To do this you have to add something to one of the many VMS boot startup files like SYSTARTUP.COMor some such. You need to be the system manager to do this, and if you are, you probably know where you personally like to put these things. The command line should be as in the example when you tested it, except the port should be 80 (not 8000), and there should be no trace requested.

In practice it seems that under VMS you always have to start a DCL environment to run a server, because if you just detach HTTPD you can't pass it any parameters. So you use the usual trick of running loginout.exe to create a DCL environment:

		$RUN/DETACH/IN=SYS$EXE:HTTPD.COM/OUT=SYS$TEMP:HTTPD.LOG -
 		    SYS$SYSTEM:LOGINOUT.EXE

where HTTPD.COM is
		$ httpd == $sys$disk:[my.directory]httpd.exe
		$ httpd -p 80 "/sys$disk/my/public"

Check that out and tell me if it doesn't work...
Tim BL