MLG Software : Web server setup


General

The Machine Listening Group operates its own web server containing home sites of the group members, information on the group's projects and other stuff. The server machine is SOUND.MEDIA.MIT.EDU (a DECstation) and that is the name used in URLs, i.e. there is no WWW.MLG.MEDIA.MIT alias or similar.

We are running the NCSA http daemon, currently version 1.5. Although all the server files used to be on the fileserver at /ti/local/ds/etc/httpd, in an effort to improve performance and reliability, I moved them onto SOUND's local disk (which is a rather empty 1G), so now all the server files are at sound:/var/httpd . This includes the httpd build, the log files (in /var/httpd/sound.media.mit.edu/logs), the central cgi-bin directory.

Upgrading the HTTPd daemon

(These notes were written by Keith after upgrading from v1.4.2 to v1.5)

To install an upgrade of NCSA HTTPd, go to their website and download the source distribution. Make a new directory in sound:/var/httpd to hold the new sources and binaries. They have supported ULTRIX up through HTTPd v1.5, so you can probably download the httpd binary directly. That gets saved as sound:/var/httpd/newhttpddir/httpd.

Go through the config files one by one, noting the differences between the ones that came with the new distribution and the ones for the version we're currently running. Make changes as necessary to reflect our configuration (Mostly, it's just directory locations that need to be tweaked).

As noted below, diff the cgi-src/Makefile and cgi-src/imagemap.c against our installed versions and fix the one environment variable that DAn customized. Make the cgi binaries, and copy any cgi-scripts from the old cgi-bin directory to the new that aren't already in the new one (there are only 2 at present: mjcomment and genmail).

Kill the httpd process that is running on sound. Change sound:/var/httpd/httpdsrcdir to point to the new source directory. Then restart the daemon with /etc/rc.httpd. You're done!

Server usage statistics

We run wwwstat-1.0 and gwstat to convert our access files into aggregate usage statistics and graphs thereof. The (patched) perl scripts for these two programs are based at the /var/httpd root, although the data files they use and create are on the fileserver, in our server's home directory, /ti/http, at /ti/http/stats .

The stats munging is run every night at midnight by an entry in SOUND's /var/conf/crontab which executes the shell script /var/httpd/run-wwwstat.cron . This script runs wwwstat to convert the log files to summary text, then runs gwstat to convert the summary text to charts as GIFs. It also handles deleting and compressing log files on the first day of each month, and attempts to kill and restart the http daemon every sunday morning. This is in response to the bugs in httpd 1.4.2 which cause the daemon to run out of file handles after a certain length of time, which basically hangs the machine. Restarting every week ought to pre-empt this, but this aspect of the script may or may not be working.

The run-wwwstat script sends mail every time it completes. Thus, I currently get one mail message a day just confirming that the cron script runs. Occasionally this alerts me to problems - such as the httpd has stopped writing logs, or the fileserver is down - so it's probably worth sending to somebody.

CGI-bin scripts

We run the imagemap CGI script, but our version is slightly patched from the standard NCSA distribution. When you grab a new version of httpd, be sure to diff the new cgi-src/imagemap.c and cgi-src/Makefile against the existing versions (the log file location is specified in the Makefile).

We have also added the 'genmail' perl script in /cgi-bin, so be sure to copy this across too.


Back to computational resources

Back to Machine Listening Group home page


DAn Ellis <dpwe@media.mit.edu>
MIT Media Lab Perceptual Computing