Simple Web Server
Simple Web Server is multi-threaded socket application written in low level C language. It is designed specifically for easy management and usage. It, definitely, does not require hire system administrator for installation and management. It is single executable file 'PolarWebSrv.exe' without additional DLLs or libraries. It does not modify the registry when installed and uninstalled. It, actually, does not have an installation procedure. It publishes sites from all subdirectories when running and closes access to sites when terminated. In order to make everything as simple as possible the Web shared subdirectories must have same name as the name of the Web host computer. Web shared subdirectories must be in the same folder with executable file. For example, if computer handles requests for static IP address 126.96.36.199 and domain name www.graitler.com These subdirectories are organized in the same folder with Web server executable file 'PolarWebSrv.exe'.
When HTTP request is coming ('http://www.graitler.com') server finds default HTML file, which must have predefined name 'index.html' (not 'index.htm'). In case other file is HTTP requested the full file name should be specified, for example 'http://www.graitler.com/Cpp/Test6.htm'.
When server started the dialog box with suggested IP address and port is popped up. The IP address is retrieved from operating system. It is, however, can be changed into any other valid address and port. The check box 'Show window when running' manages the way the server is running, with exposed window or as background process (quietly).
If window is shown, it indicates the list of Web shared directories, IP address and port. To terminate server user needs to close window.
If check box unchecked and server started on the background user needs to call task manager to terminate process.
Another important functionality of the server is internal ports mapping or proxy or impersonation. It allows to redirect traffic from another Web server running on different port to port 80. For example, if computer is hosting several dedicated Web servers on different ports, but all clients want to log on port 80 only, the other servers may be started on internal IP addresses 127.0.0.1:1001 and 127.0.0.1:1002 and virtual subdirectories may be introduced and associated with local IPs and ports. These virtual directories are not exist. The names are used at a run time to redirect traffic. For example, external HTTP request for www.graitler.com/gilink is redirected to 127.0.0.1:1001 and in response message all links to 127.0.0.1:1001 replaced by www.graitler.com/gilink on-the-fly.
That makes possible to have multiple dedicated servers technically listening on port 80 and to avoid firewall ports blocking. If user does not need this option nothing should be entered into this tab.