|Simple httpd web server running on 4.3 BSD VAX|
So I followed the instructions and got a working web server by compiling Nigel Griffiths's nweb which needed only minor tweaks to get compiled with gcc version 126.96.36.199 VAX-DEC-BSD. You can download the tweaked nweb from here.
It works fine, except that every time it serves a web page, it leaves a zombie <defunct> process behind in 4.3 BSD process table:
I played around with the nweb23.c source code trying things including changing the System-V SIGCLD to BSD SIGCHLD, a dedicated signal handler function, introducing wait() system call, etc. but could not get rid of zombies left behind when the forked process exited after serving a http request. It appears the confusion about zombies was pretty common in these ancient but exciting times - for example here is excerpt from Shichao's Notes:
Perhaps the 4.3 BSD kernel works this way and does a cleanup of zombies when needed, as some other literature indicates.
In any case, I gave up on nweb for 4.3 BSD VAX, and switched to a much simpler, and far more rudimentary, httpd responder (I cannot call it a web server): David Egan's HTTP Server in C. This one is as minimal as it gets - when it receives anything on its listening port, it simply accepts the connection and sends back a hard-coded HTTP header string and all lines in a local file back out. It does not try to create child processes etc. I call it "shs" (simple http server) and here is the slightly-tweaked source that compiles fine with gcc 188.8.131.52 on 4.3 BSD VAX:
I also compiled the old "wget" version using gcc on 4.3 BSD VAX. This allows convenient downloading of stuff from around the web. The 4.3 BSD VAX binaries of nweb, shs and wget can be downloaded from my google drive.
Lastly, you can see the little 4.3 BSD VAX http web server in action at http://sanyal.duckdns.org:94/.