TinyWeb Server Homepage

Table of Contents

 

Intro

TinyWeb is intended to be a simple Win32 daemon for regular (TCP/http) and secure (SSL/https) web servers. TinyWeb is written by Max Masyutin (max@ritlabs.com) using Delphi. Source code is also provided.

This program is FREE for commercial and non-commercial use. The only restriction is that copyright holder must be attributed with the development of this code. See the LICENCE file for more details. Well, as this has been in essence an unpaid effort there is no guarantee of support (you get what you pay for :-), however I do undertake a limited amount of consulting.

This program may be freely distributed, provided the distribution package is not modified. No person or company may charge a fee for the distribution of this program without written permission of the copyright holder.

TinyWeb is extremely small (executable file size is 49K), simple (no any configuration except command line) and fast (consumes as little system memory and CPU resources as possible). TinyWeb installs in minutes and maintains a low-memory profile.

TinyWeb has got five-star rating at ZDNet HotFiles
 

Installing

To install TinyWeb server just create a shortcut in Startup menu with the following properties:

Targetc:\www\bin\tiny.exe c:\www\root
Start Inc:\www\log

c:\www\bin\tiny.exe is the path to TinyWeb executable, c:\www\root is the path to www home (root) directory, and c:\www\log is the directory for log files TinyWeb keeps.

TinyWeb is neither windowed nor console application, moreover, it is not a Windows Service. Once started, tiny.exe will appear in Task List. There is no way to stop Tiny Web except End Task operation.

Command-line Options

Examples

Run TinyWeb on port 8000:
c:\www\bin\tiny.exe c:\www\root 8000

Run TinyWeb on port 8000 and address 212.56.194.250:
c:\www\bin\tiny.exe c:\www\root 8000 212.56.194.250
 

What does TinyWeb do

Handles http-requests!

Path to home directory is taken from command line as a first parameter. The second parameter is bind-port and the third is bind-address, both are optional, don't use them if unsure. The default directory root file name is index.html. Make sure that index.html exists in the directory first command line paramenter points to. Please refer to error_log in case of any troubles. The only GET, HEAD and POST commands are handled.

Executes CGI applicaions!

The following environment variables are passed to application:

To learn more about CGI, please visit http://hoohoo.ncsa.uiuc.edu/cgi/.

CGI interface was tested with ActivePerl for NT, which is available at http://www.activestate.com/

CGI application are being executed from /cgi-bin/ directory only.

The samples to test CGI are provided in cgitest.zip package within TinyWeb archive.

Note that TinyWeb extracts content-types, associated to file extensions, and script interpreters (e.g. Perl) form Windows Registry, so make sure that .html, .htm, .pl are registered file types. It means that I recommend to use .pl as an extension for CGI-scripts written in Perl.

The information is being taken from registry (to TinyWeb's cache) on TinyWeb's startup, so if you made some content-type or file-assotiation-related changes of registry, you must reload TinyWeb in order to take effect.

Keeps logs!

TinyWeb keeps Apache-compatible The Common Logfile Format log files: access_log, agent_log, referer_log and error_log, which can be analyzed by any compatible log analyzer, eg:

If some of them do not do what you want, let me know! You can also try some of the other log analysis tools. Consult the Yahoo guide for a list.

Logs are kept in a derectory from that TinyWeb was started. Make sure that "Start In" directory of TinyWeb properties is set properly.

Please note that TinyWeb doesn't support W3C's Extended Log File Format.
 

What does TinyWeb not support

Administration and setup

Logging

Protocol Support and Includes

Security

Searching and Indexing

Other Features

 

TinySSL

TinySSL is a Secure Socket Layer Server Daemon, it is almost the same as TinyWeb but uses DLLs of SSLeay library.

SSLeay is a free implementation of Netscape's Secure Socket Layer written by Eric Young (eay@cryptsoft.com), please visit SSLeay FAQ at http://www.psy.uq.edu.au/~ftp/Crypto/ for a lot of useful information about it. The current version of TinySSL uses SSLeay DLLs v0.9.0 (10-Apr-1998).

We do run TinySSL on a secure server certified by Thawte at https://support.ritlabs.com/

Installing a Secure Socket Layer Server using TinySSL

In order to initiatine a SSL-connection, the secure server must have a certificate or, in other words, Digital ID (there is a good Information Desk on that at Verisign and FAQ on Cryptography at RSA). The client can (and probably should) have a certificate. TinySSL does not currently provide client-certificate verifications.

First of all, you must generate your secure server's RSA private key. For that, feed .rnd file with lots of interesting and varied data, that would be used for key generation. .rnd is unformatted file, size don't care. You can copy a wav-file with digitized noize to it, or just a text-file with randomly-typed words and phrases.

To generate a key, type:


ssleay genrsa -rand .rnd -out key.pem 1024

This command sequence will generate a 1024-bit RSA private key and store it in the file key.pem. The key should look like:


-----BEGIN RSA PRIVATE KEY-----

MIIBOwIBAAJBALtv55QyzG6i2PlwZ1pah7++Gv8L5j6Hnyr/uTZE1NLG0ABDDexm

q/R4KedLjFEIYjocDui+IXs62NNtXrT8odkCAwEAAQJAbwXq0vJ/+uyEvsNgxLko

nWmM1KvqnAo5uQIhALqEADu5U1Wvt8UN8UDGBRPQulHWNycuNV45d3nnskWPAiAw

ueTyr6WsZ5+SD8g/Hy3xuvF3nPmJRH+rwvVihlcFOg==

-----END RSA PRIVATE KEY-----

Remember, that your secure server certificate (Digital ID) will be useless without the key.

Obtaining a certificate (Digital ID) for secure server

Then you should generate your Certificate Signing Request (CSR). The CSR is what contains the name information for the certificate (Country, State/Province, City, Organization, Division, Web Server Domain Name, etc). It also contains your public key. The formats of certificate and CSR used by TinySSL are the same as for Apache-SSL. CSR should be sent for verification to Certificate Authority (CA) e.g. to Verisign (www.verisign.com) or Thawte (www.thawte.com). Thawte has issued a certificate for TinySSL without any problem, we use it at https://support.ritlabs.com/. Verisign are now signing certificate requests for Apache-SSL, more details are online. After verification you will probably receive the certificate.

To generate your CSR, run:


ssleay req -new -key key.pem -out req.pem -config ssleay.cnf 

This command sequence will prompt you for the attributes of your certificate. Remember to give the secure server domain name when you would be prompted for "Common Name".

The request should look like:


-----BEGIN CERTIFICATE REQUEST-----

MIIBGzCBxgIBADBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEa

MBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGkNsaWVudCB0ZXN0

2NNtXrT8odkCAwEAATANBgkqhkiG9w0BAQQFAANBAC5JBTeji7RosqMaUIDzIW13

oO6+kPhx9fXSpMFHIsY3aH92Milkov/2A4SuZTcnv/P6+8klmS0EaiUKcRzak4E=

-----END CERTIFICATE REQUEST-----

You will now have a private key in key.pem and a CSR in req.pem

Make sure to store key.pem in a safe place. You will need the key to operate your secure server when CA issue your certificate. Note, that it is very important to backup the private key that corresponds to the certificate you purchased. Without the private key the certificate is quite useless. For good security reasons the most of CA's are unable to reissue certificates arbitrarily if you cannot access your private key!

Then send req.pem to CA.

Upon reception of a signed certificate from CA, put it to cert.pem.

The certificate should look like:


-----BEGIN CERTIFICATE-----                                     

MIICLjCCAZcCAQEwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV

BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD

dp7jnmWZwKZ9cXsNUS2o4OL07qOk2HOywC0YsNZQsOBu1CBTYYkIefDiKFL1zQHh

8lwwNd4NP+OE3NzUNkCfh4DnFfg9WHkXUlD5UpxNRJ4gJA==                

-----END CERTIFICATE-----                                       

You can also generate a temporary but ready to use untrusted test certificate by running:


ssleay req -new -key key.pem -out cert.pem -x509 -config ssleay.cnf 

There is also a good temporary untrusted test certificate generator at http://www.cryptsoft.com/~tjh/usercert.cgi. Also, you can get a free trial secure server certificate from Verisign at http://digitalid.verisign.com/test_server_ids.html (choose Apache-SSL or any compatible server) or from Thawte at https://www.thawte.com/cgi/server/test.exe (chose Generate an X.509v3 certificate & Use the most basic format).

We do run TinySSL on a secure server certified by Thawte. If you enter https://support.ritlabs.com/, you would be able to see the following:

This Certificate belongs to:
support.ritlabs.com
support@ritlabs.com
RIT Research Labs
RITLABS S.R.L.
Chisinau, MD
This Certificate was issued by:
Thawte Server CA
server-certs@thawte.com
Certification Services Division
Thawte Consulting cc
Cape Town, Western Cape, ZA
Serial Number: 1C:A5
This Certificate is valid from Wed Jun 24, 1998 to Thu Jun 24, 1999
Certificate Fingerprint:
57:DE:35:DD:B1:B7:89:81:49:F5:08:D2:09:68:2A:AB

Starting secure server

Before starting TinySSL, make shure key.pem, cert.pem and .rnd files are in the same directory with TinySSL.exe.

Run TinySSL.exe with the same parameters as needed for tiny.exe.
 

TroubleShooting & FAQ

Q?When I use my browser to show me my home page it displays its source, i.e. with HTML tags. My browser also reports that the Content-Type of the document is "text/plain", whereas on other home pages I noticed that it is "text/html". Have you any ideas why this is, and what I can do to put it right?
A:As stated above, TinyWeb uses Window Registry to obtain the information about content-types, file extensions, and script interpreters. If your registry does not contain the information about content-types, try to fill the basic minimum of HKEY_CLASSES_ROOT values by starting web.reg.
 
Q?I compiled a CGI script written in C as a DOS-application. Why does TinyWeb not execute it?
A:DOS-based CGI scripts are not supported. Try to compile the script for Win32.
 
Q?Does TinyWEB support SSI (Server-Side Includes)?
A:No. There are good docs on NCSA SSI and Apache SSI, explaining SSI concepts, though.
 
Q?I just made my homepage and launched TinyWeb. What should I enter in my browser's location field to access my site locally?
A:http://localhost/
 
Q?I was able to view it as "http://localhost/", but I couldn't figure out how to make an internet host address (ex: http://www.ritlabs.com). Can you help?
A:Please contact your Internet Service Provider or Network Administrator.
 
Q?What is the difference between TinyWeb and TinySSL?
A:There is no difference except TinyWeb uses generic TCP connection while TinySSL adds a Secure Socket Layer to a TCP connection. Thus TinyWeb is an http daemon while TinySSL is an https daemon. Look the source code for DEF_SSL conditional definitions for more details.
 
Q?Is downloading and using of TinySSL legal?
A:You need to read quite a bit of information about SSLeay to draw your own conclusions - and then go and talk to a lawyer.
 
Q?What editor did you use to create this HTML page?
A:I've used FAR (C) 1996-98 Eugene Roshal.
 

History

0.5 (2-Dec-1997)

0.6 (17-Dec-1997)

0.7 (21-Dec-1997)

0.7/SSL (2-May-1998)

0.9 (18-May-1998)

1.0 (1-Jun-1998)

1.0a/SSL (26-Jun-1998)

1.3 (12-Oct-1998)

1.4 (17-Oct-1998)

1.4/SSL (12-Dec-1998)

1.5 (20-Dec-1998)

1.6 (21-Jan-1999)

 

Feedbacks

 

Download

Current version is 1.6, released 21-Jan-1999.

* TinyWeb ver 1.6 (72K)

* If it is LEGAL, then go to Kishinev, Moldova and download TinySSL ver 1.5 (377K)


* Homepage
* Products
* FRIENDS
* Argus
* Dos Navigator
* The Bat!

Copyright © 1999 RITLABS S.R.L. All rights reserved.

HTML 3.2validated. Re-validate