TinyWeb Server on Windows
TinyWeb is the very tiny server for windows, size: 20kb, which works really fast and is very precise...
Features:
• It doesn’t require installation
• Ultra-compact (59 KB only! Compact with UPX, it is more than 28 kb)
• Consumes little memory (less than 3 MB)
• Very fast
• Free
To download Tinyweb: http://www.ritlabs.com/en/products/tinyweb/
Direct Download: http://www.ritlabs.com/download/tinyweb/tinyweb.zip
To run TinyWeb
1. You will have to create an index.html file:
Example:
c:\www\index.html
Then add:
<html><body>Hello, world !</body></html>
2. Running TinyWeb
Run on the command line:
tiny c:\www
(Note: use the absolute path)
Check the result on :
http://localhost</code>
How to Stop TinyWeb
-Go on Task Manager (CTRL+Alt+Del) then end process of tiny.exe
-Or on the command line: taskkill /F /IM tiny.exe
CGI
You can use TinyWeb to do CGI
Create a file: c:\www\cgi-bin\test.bat
Add:
@echo off
echo Content-type: text/plain
echo.
echo.
echo Hi !
echo Your IP ADDRESS is %REMOTE_ADDR% and your BROWSER is %HTTP_USER_AGENT%
Go to: http://localhost/cgi-bin/test.bat
directory is the path containing your index.html. Either be an absolute path.
port is the port on which the server has to listen to (default: 80)
ip is the IP address on which the server has to listen to (default: all)
You can launch several Tiny web servers simultaneously.
Note that it is also a version SSL: TinySSL
It is also free: http://www.ritlabs.com/en/products/tinyweb/tinyssl.php
Binay Files in CGI
Unlike Unix / Linux, the Windows console does not default to binary data.
If your CGI must send binary files (images, ZIP ...) it is necessary in your CGI, forcing the binary mode.
For example in Python, there is:
import sys
if sys.platform == "win32":
import os, msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
Links
• http://www.ritlabs.com/en/products/tinyweb/features.php
• http://www.ritlabs.com/en/products/tinyweb/install.php