![]() | Configuration of the SimpleHTTPd |
The configuration can be done remote via browser. Per default the URI (Uniform Ressource Identifier) /admin is mapped to the WWW server's administration tool. The first time, you enter this section, you will be prompted for a user name and password for an administrator account. This is necessary to prevent hackers for cracking your (unprotected) system, when no administrator account is set.
Administration section |
The main menue is separated in different blocks. These blocks are marked by colors for better optical fraction. These table background colors have no certain meaning.
Main Section | Sub-Section | Meaning |
---|---|---|
Common Settings | Common settings of the WWW server, like name of the WWW server (which may vary from the machine's name in the network), eMail address of the server's responible, etc. | |
--> | MIME Types | The MIME types allow the server to tell the client, which
file contains what kind of data. For instance, to tell the client, that a file
with extension *.gif is an image, there is a line within this section,
mapping .gif to the MIME type image/gif, so the client
knows how to handle such images.
Notes:
|
Access Paths | This is a translation list for incoming requests, which is are mapped to
(a) a certain module, (b) to a certain path within the system. Since a request
may result in static or dynamically generated data, there must be a
distinguish between the processors of the request. Here, the processors are
represented by internal and loadable modules. The requests can be distinguished
by either path, extension or both. If path or extension is omitted, all
requests match in that category. For some requests, it further necessary to
translate the WWW notation to a local access path, e.g. a path in the file
system. Requests may then be blocked or obeyed by a security scheme, that
means, access is granted only by giving a user name & password.
Notes: For translation of paths into the local file system, there are these special tokens:
Explanation: The button to end moves an entry to the end of the list. It may be used for sorting an entry to the right position in the list. | |
--> | Default Files, Index, ... | The so-called default files are the files which are searched when either no file name is given, or the specified file could not be located. (note: This is a behaviour different to other WWW servers. SimpleHTTPd first tries to find a default file before returning an error.) This list is processed top-down, like any list within the configuration. |
List of Modules | This is a list of loadable modules - under Unix, so-called *.so
or *.sl (HP/UX) files, under MS Windows 95/98/NT/2000/... and IBM OS/2
*.dll files. Loadable modules are shared objects, shared libraries or
dynamic link libraries (depending the platform). They are loaded at run-time,
so there is no need to re-compile the WWW server when addin or removing a
modules. There is a list of internal modules which are linked in the
WWW server, which cannot be removed or modified. These modules do not appear
in this List of Modules:
| |
--> | Configuration of Module ... | (reserved for future use - individual configuration of modules) |
List of Authorization Schemes | An authorization scheme is a list or group of users, that have access to a certain URI or path. Access paths may be mapped to these authorization groups. A user may be member of several authorization schemes, but it is wise to limit the number of occurrences and to set the schemes by rank levels (public groups, higher priviledged users, administrators, ...). | |
--> | Users of ... | List of users, which are within an authorization scheme (group). Note: Passwords are encrypted by a one-way encryption routine, so no passwords can be displayed nor cracked! |
Configuration File |
Per default, the configuration file is assumed to be named to httpd.cfg. If no calling parameter is given, this file is searched in the current directory. If a calling parameter is set, this configuration file is tried to be loaded. If either methods fail, a default configuration file httpd.cfg is searched in the directory, where the binary of the WWW server is located. If this search fails, default settings are taken and a httpd.cfg is created within the directory, where the WWW server (binary) is located.
The configuration file is an ASCII file, which is separated in groups and settings. A group is marked by a line, starting at the left with a bracket:
[group name]Below the line, all entries not starting at the line start belong to that group. Settings are separated to setting name = setting value.
Calling Parameters |
For security reasons, some settings can only be done by calling parameters, i.e. parameters passed to the SimpleHTTPd at start-up via command line. The syntax of the SimpleHTTPd when calling by command line is:
(1) shttpd -help (2) shttpd -register (3) shttpd -unregister (4) shttpd [-dump [FILE]] [-cfg FILE] [-port N]
List of Modules |
The distribution knows some modules. Some of them are for testing and demonstration, some are ready for use. Feel free to watch the administration section and the online documentation for to see, how to use the modules.
Module Name | Purpose |
---|---|
MOD_cgi | Module for accessing CGI scripts. |
MOD_robo | Search engine and robot for checking the web site. |
MOD_ssl | Data encryption on basis of secure socket layers (SSL). This module enables a second port on the WWW server for secure access. |
MOD_stat | Statistics
generation. The modules produces an empty, transparent GIF image and counts
the hit on a certain entry. Entries are specified by (case-sensitive) names.
There is a fix limit on names - if the limit is reached, the entry with the
lowest hit rate is overwritten. The modules stores the statistics data in the
WWW server's directory in an ASCII file. To mark a page for statistics on a
name hit_me, you have to include a line <IMG SRC="/stat?hit_me">within the HTML page (if the default access paths are set). |
MOD_test | Sample module for demonstration of how to program a module. See next section. |
Localization, National Language Support (NLS) |
The SimpleHTTPd knows a very basic support for national languages. Normally, a user may specify within his browser which languages he/she prefers to get documents in. The browser send this request list via the HTTP request in a line Accept-Language. For instance, the browser may send the line
Accept-Language: de, en, frwhich means: If there is a german (de) version of the document with this URL, send it. If not, check then for an english (en) or a french (fr) version. The WWW server uses this information by adding the language/country code to the name of the file matching the URL. So if there is a file index.htm matching the URL http://somewhere.com/pub/index.htm, it is
This support of NLS is only available on static HTML pages, i.e. HTML files. For modules and CGIs, the support has to be added by the programmer himself. The administration section and most parts of the online documentation will only be available in English.
The country/language tags are used that way, they are added to the end of the corresponding base HTML file name plus a dot, i.e.
<base_HTML_file_name> + '.' + <country_code>The country_code is a copy of the code given by Accept-Language, but only ASCII codes 'A .. Z' (which are converted to their lower-case counterparts), 'a .. z', '0 .. 9' are copyied, '.' (dot) and '_' and '-' are converted to '-', all other characters are skipped.
| ©. 1998-2000 by Dirk Ohme |