ServerRoot
HostName
Port
PidFile
UserId
GroupId
Enable
Disable
IdentityCheck
Welcome
AlwaysWelcome
UserDir
MetaDir
MetaSuffix
MaxContentLengthBuffer
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:
blank.xbm
blank icon for aligning the header with listing
directory.xbm
for directories
back.xbm
for parent directory
unknown.xbm
for unknown types
binary.xbm
for binary files
text.xbm
for text files
image.xbm
for image files
movie.xbm
for movies
sound.xbm
for audio files
tar.xbm
for tar files
compressed.xbm
for compressed files
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
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/*
httpd
is generating references to itself (redirection
responses to clients). If necessary, provide full server hostname
with HostName
directive:
HostName full.server.host.nameYou may want to use this also when the real host name is different from what you want the clients to see (you have a DNS alias for the host).
Port
configuration directive
instead of the -p
port command line option. Normally:
Port 80
-p
port command line line option still overrides
this default.
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
.
ServerRoot /Web/serverroot PidFile logs/httpd-pidwould cause the process id to be written to
/Web/serverroot/logs/httpd-pid
.
UserId
directive sets the default user to run as instead
of nobody
. This directive is only meaningful when
running server as root.
UserId whoever
GroupId
directive sets the default group to run under
instead of nogroup
. This directive is only meaningful
when running server as root.
GroupId whichever
Enable METHOD Disable METHODBy default
GET
, HEAD
and
POST
are enabled, and the rest are disabled.
Enable POST Disable DELETE
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 Offand 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.
[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
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
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 OffDefault value is
On
.
UserDir
directive:
UserDir dir-nameThe dir-name argument is the directory in each user's home directory to be exported, for example
WWW
:
UserDir WWW
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-nameMeta-information is stored in a file with the same name as the actual document, but appended with a suffix specified via
MetaSuffix
directive:
MetaSuffix .suffixMeta-information files contain RFC822-style headers.
Default settings are:
MetaDir .web MetaSuffix .metameaning 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.htmlwould be:
/Web/Demo/.web/file.html.meta
httpd
normally gives a content-lenght header line for
every document it returns. When it's running as a proxy it buffers the document
received from the remote server before sending it to the client. This
directive can be used to set the value of this buffer - if it is
exceeded the document will be returned without a content-lenght header
field. Default setting is 50 kilobytes:
MaxContentLengthBuffer 50 K