![]() |
Table of Contents
- I. License
- II. Installing
- III. Using Sami HTTP Server
-
- 1. Starting up
- 2. The information screen
- 3. Statistics
- 4. Virtual directory
- 5. Settings
- 6. The log viewer
- IV. FAQ
-
- 1. Enable PHP
- V. Troubleshooting
I. License
Sami HTTP Server is freeware, and is distributed without guarantees. The creator of the software can not be held responsible for possible damage caused by installing or using this software. None of the contents included may be modified.
Sami HTTP Server may be freely distributed and shared, but no form of sale is allowed.
II. Installing
Simply run the installer program, select the desired destination directory, and start Sami HTTP Server. A window will pop up to greet you the first time you run the program, and you will also be directed to the Settings window after that.
1. Starting up
After installing Sami HTTP Server and starting the program, a window with a greeting text will open. You will also be directed to the Settings window; this can later be reached by right-clicking on the icon in the system tray, next to the clock.

2. The information screen
The first thing you will see when opening the Settings window is the information screen.

Here you can inspect the currently logged in clients or check the total bandwidth usage or the uptime. You may also want to click the green play button in order to start the server. If the stop button is later pressed, no clients will be able to connect to the server.
Note: the currently logged in clients will not be removed when stopping the server.
3. Statistics
Selecting the statistics tab takes you to a brief summary of statistics for the server.

You can select what time span you wish to view statistics for, and then inspect the amount of downloaded data as well as what individual files were downloaded.
4. Virtual directory
The directory tab takes you to the virtual directory setup.

This is a directory of all the files you want to make available. You always have a root directory entry, /, and that can never be removed. This signifies the root of your webserver. If you wish to create new subdirectories, simply select what place you wish the new directory to be created at, and press Create new directory.
In order to add files, select a directory and press Add files. If you wish to add all contents of a directory - including subdirectories - press Add directory instead.
If you wish to remove a file or a directory, press Remove. Pressing Clear all removes every file and directory, and leaves you with an empty root directory.
Note: adding or removing files or directories in your virtual directory never affects files on your hard drive! You will not make any changes to your existing files, so it is safe to add or remove files located anywhere at all.
5. Settings
The settings screen lets you manipulate the server and access settings.

The standard port number for a webserver is 80, but you can change it to anything you wish here. Be sure to stop and restart the server for that change to take effect. The maximum bandwith allowed for the server can also be specified, as well as the maximum number of users that can be connected.
The Auto-load index.* button sets whether or not you want index files to be automatically loaded when a client asks for a directory. This is enabled by default. Enable directory view is also enabled by default; it allows a client to get a listing of the directories and files. If you wish to disable logging or change the log file, you can also do that.
Ban settings shows the list of IPs you do not wish to have access to your server. If an IP number is present in this list, all connections attempted from it is automatically closed immediately.
If you wish to enable PHP, please refer to the FAQ entry about how to enable PHP.
6. The log viewer
The log viewer shows you the activity during the current uptime of the server.

Successful requests are shown as green, and failed are shown red. You can clear the log window, or save it as a text file by pressing the appropriate buttons. If you wish to view the whole log since the installation of the server, press Open server log....
Note: if you press Ctrl+C while you have selected a line in the log window, you will copy the contents. This can be practical if you wish to get the IP of a specific request.
1. Enable PHP
PHP parsing is not built-in in Sami HTTP Server, so you need to install the PHP package for this. Go to http://www.php.net/downloads.php and download the latest PHP installer (or zip package). The version used when developing Sami HTTP Server was php-5.1.2.
To make things easy, simply download the Windows installer and select none when asked which webserver to configure PHP for. After that, open up the Sami HTTP Server settings window. There, click the Enable PHP button, and select the PHP installation directory.
Sami HTTP Server uses the file php-cgi.exe to parse PHP files, so that file must be present in the PHP installation directory. With version 5.1.2 or higher, this file will be present.
1. "Error: Cannot initialise server socket"
This means that the port specified for use with the server is busy. Most probably another server application is using that port already. Either change the port number in the settings, or shut down the offending program and try again.
