A simple http only webserver. It can serve most file types, throw 404 errors and handle multiple requests after each other.
The script is implemented in under 100 lines of shell, however, note that most of the script is used for matching content types and that the actual operation of the script if much smaller.
This script does not care for safety. While I haven't done it myself it's possible that this script is capable of directory traversal.
A netcat with support for the -e flag (I'm using busybox netcat).
If you wish to use another method of handling clients then read the netcat subheader
Either install with make install or if you wish to choose your own location make BINDIR=<dir> install or just move it to a directory yourself.
You will probably want to run this as root.
shttp [server]The script actually only takes requests as STDIN and sends responses to STDOUT. It just runs itself with netcat unless the "server" argument is given. Therefore you could easily modify the script to work with another method for client handling.