Lightweight Web Server

This is a single process, single threaded web server for linux based on select and nonblocking sends and receives. It does not support CGIs or chunked output (so, it takes one TCP connection per page element). It does support multiple simultaneous downloading of large files. C source code is provided.

Here's what its config file looks like:

lwweb {
   server Lightweight Web Server
   port 28000
   html_dir /usr/src/cgi/lwweb/
   logfile ./lwweb.log
   maxsockets 16
   droptime 3
   default_mime_type application/octet-stream
   mime_types {
      text/html                       html htm
      text/plain                      txt asm c inc h cfg
      image/png                       png
      image/bmp                       bmp
      image/jpeg                      jpg jpeg
      image/gif                       gif
      audio/mpeg                      mp3
      audio/x-wav                     wav
      video/mpeg                      mpg mpeg
      video/quicktime                 mov qt
      video/x-msvideo                 avi
      application/pdf                 pdf
      application/zip                 zip
      application/x-stuffit           sit
      application/x-shockwave-flash   swf
Download lwweb.tar.gz