PDepp Webserver Manual: User and Administrator Manual | ||
---|---|---|
Prev |
The file pdepp.conf is the configuration file of the PDepp Webserver (pdeppd(8)). It is read by the server while initializing. Any configuration file option can be overwritten by its corresponding command line option if there is any.
Each line of the pdepp.conf file may contain a key, an "=" sign and a value, followed by an optional comment starting with a "#" sign. Empty lines and comment-only-lines are also allowed. (That is, in EBNF a pdepp.conf line would look like [key "=" value] [# comment].) Each key must consist of alpha-numeric characters, underscores ("_"), hyphens ("-") and dots (".").
Caution |
Lines starting with invalid keys are currently swallowed without an error message! |
Each value must consist of alphanumeric and punctuation characters ONLY or it may be any arbitrary string enclosed by quotations marks '"'. There's no limitation of what characters are allowed to be in a comment.
Specifies the maxmimum number of concurrent connections allowed. If N clients are connected any further connection attempt will be refused, until one of the connected clients disconnects. This way the server can't take the whole machine down if it's overloaded. Setting the limit too low, however, will cause rejected connections even if the system could still process some more. You may have to try to find a reasonable value. Most operating systems have a fixed limit for the maximum number of connections a single process can wait for. It you exeed this limit PDEPP Webserver will tell you and reduce the limit to the maximum value allowed. If there is any need we can work around this fixed limit, just contact us.
Default setting is "1000".
Specifies the number of seconds after which an inactive client is disconnected by the server. This helps to free ressources by getting rid of connections to clients that e.g. crashed. However you should not set that limit too low if you don't want to disconnect clients with a slow/overloaded link.
Default setting is "60".
Tells PDEPP Webserver to switch its effective gid to the groupname given.
Default setting is "nogroup".
Specifies the name of the primary log file. You must specify a primary log file to be able to add additional log ("logN.file") files.
Specifies a format string for "logfile" and the default format string for all additional logN-files. For a discussion of log file format strings and the syntax of such a formatstring see below.
Specifies the message sources and severity levels that should be logged into "logfile". For a discussion of log message oprigins and the syntax of an originstring see below.
Specifies the name of an additional log file. All log files must be indexed with successive integer numbers in the range from 0 to 999, with the first additional log file having the index 0. A primary logfile must be specified for the additional log files to be used.
Specifies a format string for logN.file or for a specific logging source and / or severity level of the messages. More specialised format strings will overwrite more generic ones. For a discussion of log file format strings and the syntax of such a formatstring see below.
Specifies the message sources and severity levels that should be logged into logN.file. For a discussion of log message oprigins and the syntax of an originstring see below.
Specifies the MIME type table read for MIME type resolution. The MIME type table file has one line for each mime type with the format
The Default setting is mime.types.mime/type ext ext ext
Specifies the TCP port the PDepp Webserver should listen on.
Default setting is 1952.
Specifies if the "Server:"-header field is included in the server's replys. Based on a recommendation in RFC 2616.
Default setting is "true".
Specifies the root of the directory tree to be served.
This parameter has not default setting.
The PDepp Webserver will allocate a buffer of N bytes for every active connection that will be used for queueing data which has to be send to the client.
Default setting is 16000 bytes.
The PDepp Webserver will allocate a buffer of N bytes for every active connection that will be used for receiving data from the client.
Default setting is 4096 bytes.
If a directory is requested by a client the PDEPP Webserver will look for this file there and reply with its contents if it is available. Otherwise "404 Not Found" is replied.
Default setting is "index.html".
Tells PDEPP Webserver to switch its euid to the username given.
Default setting is "nobody".
The PDEPP Webserver allows you to define up to 1000 log files, what kind of messages to log into each and custom message format template strings depending of the kind of message for any of them. This allows you to write log files in about any format you would like. You could, for example, log into a HTML file that can directly be displayed by a browser with different colour for different messages or try to mimic Apache's log file format (altough, however, that'd probably still be difficult or impossible with the current version of the PDEPP Webserver) to be able to use freely available log file analyzers on PDEPP Webserver output.
First, we'll have to define some terms we'll commonly use if talking about log file format configuration:
A log message source is the part / module of the server issueing the log message. It is one of
Central part of the server, here all connection requests are processed.
Its configuration file key is "S".
A connection to a single client.
Its configuration file key is "C".
The HTTP protocol parser for a single Connection.
Its configuration file key is "P".
Resquested-data fetching backend.
Its configuration file key is "R".
Part of the server responsible for the actual logging of messages.
Its configuration file key is "L".
Manager for configuration data (taken from configuration file and command line).
Its configuration file key is "F".
The MIME type table manager.
Its configuration file key is "M".
Configuration file placeholder for "any log message source" is "A".
A log message source is the part / module of the server issueing the log message. It is one of
Central part of the server, here all connection requests are processed.
Its configuration file key is "S".
A connection to a single client.
Its configuration file key is "C".
The HTTP protocol parser for a single Connection.
Its configuration file key is "P".
Resquested-data fetching backend.
Its configuration file key is "R".
Part of the server responsible for the actual logging of messages.
Its configuration file key is "L".
Manager for configuration data (taken from configuration file and command line).
Its configuration file key is "F".
The MIME type table manager.
Its configuration file key is "M".
Configuration file placeholder for "any log message source" is "A".
A so-called severity level is assigned to each message sent to the Logging Subsystem. It specifies how important the message is. Possible levels are:
Messages for server debugging purposes, these are of little interest to the server's administrator or user and are not logged by default.
Its configuration file key is "d".
Specifies purely informational messages. These are more important and useful than DEBUGging messages but will probably be not very interesting for the server's administrator or users either.
Its configuration file key is "i".
Messages tagged as "NOTICE" are important informational messages.
Its configuration file key is "n".
WARNINGs tell about recoverable exceptional situations that are not important enough to be ERRORs. ;-)
Its configuration file key is "w".
Messages of this severity level inform about unrecoverable error situations in the server and, of course, are very important. An IO error while reading from disk would fall into this category.
Its configuration file key is "e".
Reason for a "CRITICAL" message is a serious, unrecoverable error that causes the server to shut down immediately.
Its configuration file key is "c".
Configuration file placeholder for "any log message severity level (exceot DEBUG)" is "a".
A log message's origin is the combination of a message's source and severity level. Thus a message's origin completely classifies a log message.
Origin Strings let you specify from what message origins to log by default or into a specfic log file. An origin string is a free-format list of message source and severity level configuration file keys.
Specifying "log.origin" sets the default origin string for all log files and defaults to "aA".
Specifying logN.origin sets the origin string for logfile N only.
Format Strings are a way to configure how a logged message will look like. Their function is similar to that of a printf format string, it consists of arbitrary literal characters and escape strings as placeholders for the various information a log message may consist of.
Table 1. Following placeholders are defined at the moment:
Escape String | Explanation | Example |
---|---|---|
%Y | 4 digit year | 2002 |
%M | 2 digit month of the year | 01 |
%D | 2 digit day of the month | 10 |
%w | abbreviated day of the week name | Thu |
%W | day of the week name | Thursday |
%h | 2 digit hour | 12 |
%m | 2 digit minute | 13 |
%s | 2 digit second | 57 |
%S | log message source string | server core |
%L | log message text | connection to 192.168.0.1 established |
\n | newline | |
\t | horizontal tab | |
\% | a literal "%" | % |
\\ | a literal "\" | \ |
A Format String can be assigned to a specific log file (N, if given) and origin the following way: log[N][.origin].format = formatstring
Origin has following syntax: [source_key[.level_key]]. Source key is the configuration table key of a log message source and level key is the configuration table key of a log message's severity level.
A formatstring defined this way has only an effect on messages origination from the message source with the severity level specified.
If the severity level key is "a" or omitted the format string is applied to all messages from the source specified.
If the message source key is "A" the format string is applied to all messages of the specified severity level. If both the message source key and the severity level key are omitted, the format string is applied to all log messages for logfile N.
"logN.A.format" means the same as and will overwrite "logN.format".
"logN.A.smthg" will be overwritten by "logN.smthg.a" if both match a given log message's origin.