NANOWEB, the aEGiS PHP web server

ServerMode inetd

Usually nanoweb runs in so called ServerMode »standalone« (this is the case if it is started via nanoctl or when the nanoweb.php is invoked by you).
However many internet services (or the programs providing them) don't need to be kept in memory all the time and may get started at first when a connection gets established for this service. This is done on UNIX systems using the »internet superserver« inetd (or xinetd respectively). If you desire to use nanoweb in inetd mode, you need to change the ServerMode directive accordingly in nanoweb.conf .

Then you have to tell your inetd to invoke the distributed inetd-wrapper of nanoweb whenever the www/http service on your machine gets requested. Just insert these two lines into your systems /etc/inetd.conf config file:
www    stream tcp nowait root  /usr/sbin/in.nanoweb in.nanoweb
https  stream tcp nowait root  /usr/sbin/in.nanoweb in.nanoweb -ssl

This is probably already done by the install-sh, you just may need to remove the # in front (which made these lines comments).

You can force inetd to rearead its configuration file by:
root@www:~# killall -HUP inetd
(isn't such a bad command like it sounds)


The nanoweb inetd-wrapper currently requires the »getpeername« app from the tcputils package. You can download the source at ftp://ftp.lysator.liu.se/pub/unix/tcputils or if you are using Debian with apt-get install tcputils.

But, see also the README for most up to date informations on this issue.

NANOWEB, the aEGiS PHP web server