TinyWeb: minimal web server (RITLABS)

Current version
v1.94.1, 2015-08-26
Download TinyWeb-1.94.1.zip (216KB), Delphi source code and binary included.
freeware, open source
TinyWeb 1.94.1 is a small, configuration free web server for Windows, based on TinyWeb Server by RITLABS S.R.L., version 1.93. 1.94.1 incorporates changes by Peter Thoeny to support CGI files by a certain extension with a certain interpreter program.
I enhanced TinyWeb with two featurelets: command line options and primitive content negotiation.
Operating systems/languages


For basic features and documentation, refer to the TinyWeb homepage at RITLABS. I will only describe the changes I made to the original 1.93 version.

Command line options
I included the treatment of command line options.
Usage: tiny.exe -r RootDirectory [OPTIONS].
The parameters are:

  • -r RootDirectory specifies the WWW root (previously that was the first parameter)
  • -a address bind to address
  • -p port bind to given port
  • --stop try to stop another instance that was run from the same directory
  • --logdir dir uses the specified directory for log files
  • --cgiprg prg speficies a program to interpret CGI files
  • --cgiext ext specifies the file name extension fo CGI files to be treated by the CGI iterpreter
  • --help display command line options
  • -c disable content negotiation feature
  • -l language set default language (en, de, …)
Content negotiation
I implemented a very primitive form of content negotiation suitable for language alternatives of HTML files.
That means, when you request http://localhost/index.html and you have two files, one called index.html.en and one index.html.de, TinyWeb will deliver the one that matches the language selected in the browser — if it exists.
If it doesn’t exist, it will fetch the resource with the default language suffix.
If index.html itself exists, content negotiation does not take place.

Why I did this? Well, I was planning to include multi-language support in dSite and thus I needed a small, configuration free web server that can handle such requests.


I must thank RITLABS S.R.L. for providing such a small configuration free and still feature-rich web server application.