Skip to content
A very simple and small web server for 2.11BSD, called by inetd
C Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
Makefile
README.org
httpd.c Handling no file extension May 14, 2019

README.org

2.11BSD httpd

A small, and fairly bad, web server which runs under 2.11BSD.

  • Only supports GET.
  • Will send images, add your own MIME types if you like.
  • Assumes web root is /var/www
  • Probably insecure.
  • Contributions very welcome.

If my PDP-11 is running, you can see the page it hosts at http://catbert.rhwyd.co.uk or alternative http://emubert.rhwyd.co.uk

Setup Instructions

Copy httpd.c to your PDP-11, compile it and move the binary to the proper place:

cc httpd.c -o httpd
mv httpd /usr/libexec/httpd

Append the following line to /etc/inetd.conf

http    stream  tcp     nowait  nobody  /usr/libexec/tcpd       httpd

or

http    stream  tcp     nowait  nobody  /usr/libexec/httpd      httpd

using tcpd instead of directly calling httpd (you can if you like), will allow you to user your hosts.allow file to limit access. If inetd was compiled with -DPARANOID (it probably was), it will also block hosts which have wrong reverse DNS records, which may not be desirable.

Append the following line to /etc/services

http            80/tcp

Find the process ID of inetd and send it a HUP:

ps aux | grep inetd
kill -HUP <PID>

Finally, create /var/www/index.html, along with your other files, and ensure they are readable by nobody, or world readable.

You can’t perform that action at this time.