I been looking for a minute HTTP server for a small appliance and stumbled over althttpd by Richard Hipp, the author of SQLite. It's a single C source file which, after compiling, is launched via inetd (or xinetd), delivers static content and CGI (if the file is executable), and it even supports virtual sites.

$ make althttpd
$ sudo install -m111 althttpd /sbin/althttpd
$ grep althttp /etc/services
althttp         8001/tcp

$ grep althttp /etc/inetd.conf
althttp stream tcp nowait jpm /sbin/althttpd althttpd -root /home/jpm/os -user jpm 

$ mkdir /home/jpm/os/default.website
$ echo It works > /home/jpm/os/default.website/index.txt

$ curl -qs http://example.com:8001/index.txt
It works

Perfect for my setup and really sweet.

Further reading


blog comments powered by Disqus