Really small HTTP server (org.dyndns.hvkls.microhttpd) // configuration
micro_httpd is a very small Unix-based HTTP server. It runs from inetd, which means its performance is poor. But for low-traffic sites, it’s quite adequate. It implements all the basic features of an HTTP server, including:
- Security against “..” filename snooping
- The common MIME types
- Trailing-slash redirection
- index.html
- Directory listings
All in about 200 lines of code.
micro_httpd can also be used to serve HTTPS by wrapping it with stunnel.
Usage
The server comes preconfigured to serve the contents of your home directory (/var/mobile/), which you can change in /Library/LaunchDaemons/org.dyndns.hvkls.microhttpd. It’s protected from the outside world, so your files are only visible from your phone (TCP wrappers).The server starts on demand, and uses virtually no resources (xinetd). It facilitates, for example, the reading of PDF documents and eBooks with MobileSafari. Just point your browser to http://localhost/.
Version History
- 20051212-5 Debian archive contents corrected
- 20051212-4 Added dependency to org.dyndns.hvkls.repository
Comments are closed.