Home Web Server

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Home Web Server

Home Web Server


First revision: 28.08.2004, Ari Pikivirta
Last updated: 16.09.2004, Ari Pikivirta

Introduction

Home Web Server is a freeware Windows web server with lots of features.
This is a very common saying, but this time – the phrase has the real
meaning. To mention some of home web server features: There is support
for open SSL, support for PHP, support for CGI application, support for
executing ISAPI extensions, server-replace-tags, virtual root aliases, and
much more. This document will describe functions included.

1 of 19
Home Web Server

First steps to get it running


After installation is completed the home web server application is already
ready to run as http server on your local computer. So, here is how you
can see what it takes to look pages served from your computer:

1. Run Home Web Server


2. Switch to “Http server” tab, by clicking the tab at the bottom of the
window appeared.

3. Then click “Start server” button. Next you see is that status bar says
that your web server has been started at port 80 and also to indicate
the web server is running the edit box at bottom left corner turns to
green.
4. Next switch to “System log” tab from the bottom of the window.
5. Run your default internet browser and navigate to address:
http://127.0.0.1. This address always re-presents your local computer.
6. To check that the default page served is coming from your local
computer, check out the home web server log (the one we just
switched the view to). It should now look like this:

7. You are now done with your first steps to run your own local web
server.

It was not so hard, wasn’t it? The default page explains also some of the
home web server features. By reading that page through and checking
out the http source files located under the installation path of home web
server you can easily build up very professional looking home page for
your self.

2 of 19
Home Web Server

Settings, Defaults

Server name:

When some of the http client applications request server name,


value entered here will be presented as the web server. So, by
changing this you really have your own web server.

Max connections count:

Default is zero. Max connection count defines the maximum


number of simultaneous connections allowed. By setting this value
to zero there is no limitation of maximum connections.

Session timeout (ms):

For each client connected the home web server creates session,
which will carry on clients username and password for example. If
you set this timeout very short the client might not be able to
browse the “member” pages if defined – because their data are
timed out. Session timeout counter is restarted always on clients
last request time.

3 of 19
Home Web Server

Enable server-replace-tags:

By checking this checkbox you enable server to replace all server-


replace-tags before serving out documents containing *text* in it’s
mime type. This basically means all html and text documents.

Start Web Server at Program startup:

When checked, home web server will start the http (and https)
server on program startup.

4 of 19
Home Web Server

Settings, Responses

Responses tab on http settings defines the document defaults and


templates to serve as follows:

Default file name to serve (all directories):

Default is index.html. If no document is specified in clients request


(http://domain.com/documentname) then the server checks out if
this file is located into that requested folder and serves out this
document if it exists. Otherwise request will lead into file not found
response.

Anonymous users web directory:

This is root directory of your web server. And all users that has not
logged in are served with contents of this directory. By first startup
the program checks out where it was installed and then points to
the default page (installation dir / http) you saw on first startup if
following the step-by-step example.

5 of 19
Home Web Server

Templates directory:

Templates directory is here for getting the response files into


common place. By default the templates directory is also pointing
to installation directory / templates. All responses are checked from
this directory and if they don’t exist the internal default response is
served to client.

Response files:

Response files are defined by only filename. The response files are
always checked from templates directory.

6 of 19
Home Web Server

Settings, Mime List

Mime list tab on http settings window contains the mime types that http
server will check before serving out any document. By default, most of the
mime types are already defined.

7 of 19
Home Web Server

Settings, CGI and ISAPI

Http settings CGI and ISAPI contains following settings:

Enable CGI applications; Alias directory:

By default the CGI application alias is set to “/cgi-bin/” and the


checkbox is checked. CGI alias has to be used for executing CGI
applications in forms for example. Otherwise the server would just
serve them out as download. Also note that to execute CGI
applications they must be located into directory named similar to
alias.

<form name=”checkthisout” action=”/cgi-bin/sendtoforum.exe”


metod=”post”>

Enable ISAPI extensions, Alias directory:

By default the ISAPI application alias is set to “/cgi-bin/” and


checkbox is not checked for disabling the “.dll” files execution. The
server only executes ISAPI extensions that are requested with the
alias directory (from the directory named same:
c:\yourhttpdir\pub\cgi-bin\forum.dll).

8 of 19
Home Web Server

Server administrator email:

This is one of the values that is used in CGI applications. Some CGI
applications use this CGI parameter.

PHP compiler:

If you want to serve out PHP files you need to use external PHP
compiler available from http://www.php.org for example. This
value is pointing to it’s default installation path C:\PHP\PHP.exe.
PHP.exe is really considered as CGI application, so the CGI
application must be enabled to serve out compiled PHP files.

9 of 19
Home Web Server

Settings, Banned List

To disable some IP accessing even anonymous folder of your web server,


add the IP into this list. When IP listed here tries to connect it is
immediately disconnected before it’s request is handled.

10 of 19
Home Web Server

Settings, Root Aliases

Root aliases mean totally different web root paths for clients requesting
documents using these aliases after your domain name. Note that root
aliases should always have the “/” in the beginning.

Example:

Location = http://127.0.0.1/~matti/forum.html

If there is root alias defined for “/~matti”, the server changes this
clients root to directory defined for this. In this example the
documents will served from D:\HTTP\MATTI.

11 of 19
Home Web Server

Settings, Domain Aliases

Domain aliases mean totally different web root paths for clients
connecting to your ip address using different domain name. By setting
these values you can run unlimited amount of domain names on this very
same web server, and all those domains can really have their own web
roots.

Example:

Your ip: 777.777.777.777


Domain 1: downstairs.dnsalias.net
Domain 2: downstairs.dnsalias.org

Only second domain must be defined (both can be defined, but it is


really not needed) with different web root to serve totally different
view for users connecting to “.org” instead of “.net”.

12 of 19
Home Web Server

Settings, Security

On security tab in http settings window, there are all Open SSL related
items. They should be filled as follows:

HTTP server checkbox:

To enable running of regular http server this checkbox must be


checked. If this is not checked, the port 80 server won’t be started
at all when start server button is pressed.

HTTPS server checkbox:

To enable running HTTPS server, when starting server, this


checkbox must be checked. Also, to run HTTPS server you must
have all the certificate files defined.

SSL / TLS:

Security mode select, when running HTTPS server.

Root certification file:

This file is the root certification file of the server (CA).

13 of 19
Home Web Server

Certification file:

Personal certification file.

Key File:

Key file extracted from personal certification file.

Password phrase:

When the HTTPS server is started the server needs to have the
correct password for the certification. This password is always
given when the certificate is created.

For more information about certificates and Open SSl, please visit
http://www.openssl.org.

14 of 19
Home Web Server

Server-Replace-Tags
If the server replace tags on http server settings are enabled the server
will replace html and text file following tags:

||BUILD Home server build number

||SERVER Server software name

||UPTIME Online time since server startup (hours)

||CONNECTIONS Amount of connections server has handled after it has


been started

||CLIENTS Current active client count

||SESSIONS Sessions handled

||BDOWNLOADED Bytes downloaded

||TIME Local time

||DATE Local date

||USER User name

||IP Users IP address

||PORT Users current port number

||SECURE True/False depending if http or https

||DIRLIST(alias;directory)

Dirlist tag creates explorer style file browser that only


searches the files in direcotry specified. All these files
are marked with alias in front of them as a link.

Example tag:
||DIRLIST(/temp/;f:\http\pub\temp\)

Result is file listing of directory f:\http\pub\temp\*


contents where all files can be clicked open as
<a hreef="/temp/*">Filename</a>.

15 of 19
Home Web Server

||FILESIZE(filename)

Server will replace this tag with filesize (in bytes) of


specified file.

Example tag:
||FILESIZE(f:\http\pub\index.html)

||FILEDATE(filename)

With this replace tag server replaces this text in html


by specified file date. Date is presented in local
computers default date format.

||MONITORCOUNT(filename)

Server replaces this tag in html with the value that


exists in monitored files on this filename.

||MONITORCOUNTTODAY(filename)

Server replaces this tag with the amount of


donwloads speceified file has on file monitor tab. If
file is not defined in monitored files, you will only see
error on your web page.

||MONITORAVGPERDAY(filename)

This is similar to “counttoday” replace tag.

16 of 19
Home Web Server

Add or Modify Client

To modify or add http member client, you have to click open the Http
Settings tab from the bottom of user interface window. From that tab click
“New client” to add new client to member list or “Modify Client” to modify
existing member data. When starting to modify member, you must first
select member to modify from list below the buttons.

When clicked above window is opened.

User name:

User name is the field to check when client tries to log in into his
private web pages. This field is case sensitive.

Password:

Password field contains case sensitive password for client to log in


to private web pages.

Home directory:

Private folder on your server that are just served to member


specified above. All but templates are served from this folder.

17 of 19
Home Web Server

To allow clients log into their personal pages, you must define login form
and logout form located into public pages (anonymous section). Forms
should be build up as follows:

Login form:

<form name=”nameisnotimportnant” method=”post”>


<input type=”hidden” name=”action” value=”LOGIN”>
<input type=”edit” name=”user”><br>
<input type=”password” name=”pass”><br>
<input type=”submit” value=”Login”><br>
</form>

Logout form:

<form name=”nameisnotimportant” method=”post”>


<input type=”hidden” name=”action” value=”LOGOUT”>
<input type=”submit” value=”Logout”><br>
</form>

Note, that these are just examples. Important thing on these forms are
the hidden inputs and of course when logging in there must be username
and password that are send as parameters on post.

18 of 19
Home Web Server

Log Settings

Log settings window can be found on system log tab. Log settings
contains the settings how different items are logged while server is
running.

Max log lines to display:

Visible log book will contain maximum this amount of lines. All lines
above this count will be just erased. Default is set to 500 lines.

Do not log picture files:

If this checkbox is checked then home web server won’t log any
files served with mime type containing text “image”, this basically
will prevent logging of all images, unless image type is not defined
in mime type list in http settings. Default is not checked.

Do not log text or html files:

If checked home web server wont log any files served containing
“text” in its mime type definition.

Log downloads to file:

If checked all files served will be logged into the file defined into
edit box below. Select file before checking this checkbox by clicking
the browse button on right.

19 of 19

You might also like