bashttpd is a simple, configurable web server written in bash
bash
, any recent version should worksocat
or netcat
to handle the underlying sockets. socat TCP4-LISTEN:8080 EXEC:/usr/local/bin/bashttpd
Or
netcat -lp 8080 -e ./bashttpd
Note that in the socat
example above, the web server will immediately exit once the first connection closes. If you wish to serve to more than one client - like most servers do, then use the variant:
socat TCP4-LISTEN:8080,fork EXEC:/usr/local/bin/bashttpd
This way, a new process is spawned for each incoming connection.
403: Returned when a directory is not listable, or a file is not readable 400: Returned when the first word of the first line is not GET
200: Returned with valid content Content-type: Bashttpd uses /usr/bin/file to determine the MIME type to sent to the browser 1.0: The server doesn't support Host: headers or other HTTP/1.1 features - it barely supports HTTP/1.0!
As always, your patches/pull requests are welcome!
"If anyone installs that anywhere, they might meet a gruesome end with a rusty fork" --- BasHTTPd creator, maintainer
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4