Very basic and insecure (vulnerable to directory traversal, and probably others) Bash HTTP server.
socat
:sudo apt-get install socat
./httpd.sh [PORT]
PORT
is the port that you want the HTTP server to run on.
PROTO
is the network protocol used (Example:UDP4
/UDP6
/TCP4
/TCP6
)SERVERTOKEN
is the contents of theServer
header sent in HTTP responsesHTTPVERSION
is the HTTP version sent in HTTP responsesWWWPATH
is an absolute path to the directory where HTML files are stored, with no trailing slash (Example:/tmp/www
)FOUROFOURFILE
is the path to the page for 404 errors, relative toWWWPATH
with preceding slash (Example:/404.html
)