AOLserver

[NB: This page is out of date; I am no longer using AOLserver. When the main server failed in June 2004, I had to switch to a new server in a hurry, which had Apache preinstalled. When things calmed down, I decided I was too lazy to switch back. -- rgr, 18-Dec-04.]

Home : Linux resources : "Howto" : AOLserver


Why run AOLserver? It's fast, reliable, and exploits are rare (unlike some other servers we could mention).

I am currently running AOLserver 3.4 (as of 7-Sep-01). Note that version 3.2 and prior are subject to a denial-of-service attack (see mail from Nate Haggard <nate at securitylogics.com> to <bugtraq at securityfocus.com> re "AOLserver 3.0 vulnerability" on 22 Aug 2001 at 16:51:45 -0600 [should get the ref from http://www.securityfocus.com/]).

nsd daemon startup is done by the /etc/init.d/nsd script; the command it uses is is

	nsd -t /usr/local/aolserver/config.tcl -u nsadmin -g web
(where the binary is in /usr/local/aolserver/bin/ on $PATH). This must be done as root, so that the daemon can bind to port 80. Add -f to run in "test mode" in foreground, but first be sure to do "/etc/init.d/nsd stop" to make the daemon go away. You can add -k to kill and restart, or -K to kill and leave dead (still needs config.tcl and -u/-g args), but this is better done via the init script.

The configuration file for this server, /usr/local/aolserver/config.tcl, does 'set servername "rgrjr"', which (I think) is how it knows that the pages are kept in the /usr/local/aolserver/servers/rgrjr/pages/ directory.

AOLserver without DNS

Note that if nsd is started when DNS service is not available, such as when the external cable modem is unconnected, the nssock.so module will fail to load, which is fatal. nsd will exit immediately, but if it was started via /etc/inittab, the init process will notice and try to start it up again, putting about 10Mbytes of startup garbage in /usr/local/aolserver/log/server.log per day. There may be a config file workaround, but in any case, it is cleaner to use a SysV startup script. [I could fix it to omit startup when we can figure out that the external network is not usable. -- rgr, 7-Sep-01. But that's not really necessary; it fails once, but that doesn't hurt anything. -- rgr, 15-Dec-02.]

The AOLserver access.log

To get a summary of the hits recorded in the access log, try

	page-hits.pl -nolocal /usr/local/aolserver/servers/rgrjr/modules/nslog/access.log

I [used to] rotate the logs manually every month by the following method:

  1. Comment out the /etc/inittab entry.
  2. "telinit q"
  3. In the /usr/local/aolserver/log/ directory, rename server.log to (e.g.) server.200008.log.
  4. In /usr/local/aolserver/servers/rgrjr/modules/nslog, rename access.log to access.200008.log (or whatever).
  5. Revert to the old /etc/inittab version.
  6. "telinit q"
  7. Do chmod 640 for both access.log and server.log, since they are otherwise world-readable. [Probably should report this as a bug. -- rgr, 3-Dec-00.]

[much later . . . ]

Oops, I'm an idiot. It's much easier to tell the server to rotate the logs by sending it a SIGHUP, assuming you have "ns_param rollonsignal true" in the "nslog" section of the /usr/local/aolserver/config.tcl file.

I currently roll the AOLserver log on the first day of every month via a crontab entry:

# rotate the AOLserver logs monthly, at midnight on the 1st.  -- rgr, 3-Feb-01.
0 0 1 * *	kill -HUP `cat /usr/local/aolserver/log/nspid.rgrjr`
This will probably generate some kind of error if the server is not running, in which case cron will send me email. That is a good thing, as I'll have to roll the log manually in that case.

AOLserver links


Bob Rogers <rogers@rgrjr.dyndns.org>
$Id: aolserver.html 89 2004-12-20 03:21:00Z rogers $