General CERN httpd Configuration Directives


ServerRoot

Server's "home" diretory is specified via ServerRoot directive. If server root is specified, but no AddIcon directive has been used in configuration file to set up icons, the default icon directory is under server root icons. The default icons that should be present are: If these defaults don't please you you can define all from the scratch. As an example of AddIcon directive, the defaults would be specified as follows:
    Pass  /httpd-internal-icons/*  /server_root/icons/*

    AddBlankIcon   /httpd-internal-icons/blank.xbm
    AddDirIcon     /httpd-internal-icons/directory.xbm  DIR
    AddParentIcon  /httpd-internal-icons/back.xbm       UP
    AddUnknownIcon /httpd-internal-icons/unknown.xbm
    AddIcon        /httpd-internal-icons/binary.xbm     BIN  binary
    AddIcon        /httpd-internal-icons/text.xbm       TXT  text/*
    AddIcon        /httpd-internal-icons/image.xbm      IMG  image/*
    AddIcon        /httpd-internal-icons/movie.xbm      MOV  video/*
    AddIcon        /httpd-internal-icons/sound.xbm      AU   audio/*
    AddIcon        /httpd-internal-icons/tar.xbm        TAR  multipart/*tar
    AddIcon        /httpd-internal-icons/compressed.xbm CMP  x-compress x-gzip

On Proxy Server

On proxy server the icon URLs must be full URLs, because otherwise clients would translate them relative to remote host. This means that in the above example all the AddIcon* directives have to read:
    AddIcon  http://your.server/httpd-internal-icons/...
and you have to pass also the full icon URL:
    Pass  http://your.server/httpd-internal-icons/*  /server_root/icons/*
Since future smart browsers might notice that the icon server is the same one as the proxy server it may be best in this case to also Pass the partial URL as above:
    Pass  /httpd-internal-icons/*  /server_root/icons/*

HostName

On some hosts the hostname lookup fails producing only the name without the domain part. Full hostname is necessary in generating redirection responses to clients. If necessary, provide full server hostname with HostName directive:
        HostName  full.server.host.name

Default Port Setting

For standalone server (the one running continuously, listening to a certain port, and forking a child to handle the request) the port to listen to can be defined via Port configuration directive instead of the -p port command line option. Normally:
        Port 80
-p port command line line option still overrides this default.


PidFile

httpd re-reads its configuration file when it receives a HUP signal [HANGUP], the signal number 1. To make it easy to find out the parent httpd process id, it writes it to a file.

By default, if ServerRoot is specified, this is the file httpd-pid under server root; if not, it defaults to /tmp/httpd-pid.

The PidFile directive can be used to set the process id file name; it can be either an absolute path, or a relative one. Relative path is relative to ServerRoot, or if not defined, relative to /tmp.

Example

        ServerRoot  /Web/serverroot
        PidFile     logs/httpd-pid
would cause the process id to be written to /Web/serverroot/logs/httpd-pid.


Default User Id

UserId directive sets the default user to run as instead of nobody. This directive is only meaningful when running server as root.
        UserId whoever

Default Group Id

GroupId directive sets the default group to run under instead of nogroup. This directive is only meaningful when running server as root.
        GroupId whichever

Enabling and Disabling HTTP Methods

You can enable/disable methods that you do/don't want your server to accept:
        Enable  METHOD
        Disable METHOD
By default GET, HEAD and POST are enabled, and the rest are disabled.

Examples

        Enable POST
        Disable DELETE

IdentityCheck

If IdentityCheck configuration directive is turned On, httpd will connect to the ident daemon (RFC931) of the remote host and find out the remote login name of the owner of the client socket. This information is written to access log file, and put into the REMOTE_IDENT CGI environment variable.

Default setting is Off:

        IdentityCheck Off
and if you don't need this information you will save the resources by keeping it off. Furthermore, this information does not provide any more security and should not be trusted to be used in access control, but rather just for informational purposes, such as logging.

WARNING

On some systems there is a kernel bug that causes all the connections to the remote node to be broken if the remote ident request is not answered (ident daemon not running, for example). This is reported for at least SunOS 4.1.1, NeXT 2.0a, ISC 3.0 with TCP 1.3, and AIX 3.2.2, and later are ok. Sony News/OS 4.51, HP-UX 8-?? and Ultrix 4.3 still have this bug. A fix for Ultrix is availabe (CSO-8919).

[Thanks to Per-Steinar Iversen from Norway for pointing this out!]

If the operating system on your server host has this bug, do not use IdentityCheck!


Welcome

Welcome directive specifies the default file name to use when only a directory name is specified in the URL. There may be many Welcome directives giving alternative welcome page names. The one that was defined earlier will have precedence.

Default values are Welcome.html, welcome.html and index.html. index.html is there only for compatibility with NCSA server; the word "Welcome" is more descriptive, and has precedence.

All default values will be overridden if Welcome directive is used.

Default values could be defined as:

        Welcome Welcome.html
        Welcome welcome.html
        Welcome index.html

AlwaysWelcome

By default there is no difference between directory names with and without a trailing slash when it comes to welcome pages. The one without a trailing slash will cause an automatic redirection to the one with a trailing slash, which then gets mapped to the welcome page.

If it is desirable to have plain directory names to produce a directory listing, and only the ones with a trailing slash cause the welcome page to be returned, set the AlwaysWelcome directive to off:

        AllwaysWelcome Off
Default value is On.


User-Supported Directories

User-supported directories, URLs of form /~username, are enabled by UserDir directive:
        UserDir dir-name
The dir-name argument is the directory in each user's home directory to be exported, for example WWW:
        UserDir WWW

Meta-Information

It is possible to tell httpd to add meta-information to response. Meta-information is stored in a directory specified by MetaDir directive, under the same directory as the file being retrieved:
        MetaDir  dir-name
Meta-information is stored in a file with the same name as the actual document, but appended with a suffix specified via MetaSuffix directive:
        MetaSuffix  .suffix
Meta-information files contain RFC822-style headers.

Default settings are:

        MetaDir    .web
        MetaSuffix .meta
meaning that meta-information files are located in the .web subdirectory, and they end in .meta suffix, i.e. the metafile for file:
        /Web/Demo/file.html
would be:
        /Web/Demo/.web/file.html.meta

httpd@info.cern.ch