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.
Default Configuration File
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.confSee also example configuration files.
Comments in Configuration File
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.
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 >
-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 >