The configuration file (often referred to as the rule file) defines how
httpd
will translate a request into a document name. The directives
controlling httpd
features are also put into the configuration
file, as well as protection configuration. This is essential to prevent
unauthorized access to your private documents.
Unlike some other HTTP servers, W3C httpd requires only a single configuration file (but it can have many).
By default, the configuration file /etc/httpd.conf
is loaded,
unless specified otherwise with the
-r
command line option:
httpd -p 80 -r /your/own/httpd.conf
See also example configuration files.
Each line consists of an operation code and one or two parameters, referred
to as the template and the result. Lines starting with a hash sign
#
are ignored, as are empty lines.
When you are running the server in standalone mode (not from
inetd
), and modify the configuration file, send the
HUP
signal to httpd
to make it re-read the
configuration file. You can find out the process number from the
pid file written by httpd, e.g.
> cat /server_root/httpd-pid 2846 > kill -HUP 2846 >
You must specify
the configuration file as an absolute pathname for the
-r
option because
when the server is started in standalone mode it changes its current directory
to /
so after startup it cannot reload configuration files that
were specified with relative filenames.
To make restarting easier httpd
has a -restart
option, which will automatically send the HUP signal to another
httpd
process. Important: To find out the
PidFile
httpd
will have to read the same configuration
file as the running httpd
has, so you have to specify the same
-r
options on the command line as for the actual
httpd
, e.g.
> httpd -r /usr/etc/httpd.conf -restart Restarting.. httpd Sending..... HUP signal to process 21379 >
@(#) $Id: Overview.html,v 1.6 1996/08/05 21:12:45 frystyk Exp $