2362N/A<!
DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
0N/A<
TITLE>Starting Apache</
TITLE>
0N/A<
h1>Starting Apache</
h1>
0N/A<
h2>Invoking Apache</
h2>
0N/AThe <
code>httpd</
code> program is either invoked by the Internet
0N/Adaemon <
code>inetd</
code> each time a connection to the HTTP service is made,
0N/Aor alternatively it may run as a daemon which executes continuously, handling
0N/Arequests. Whatever method is chosen, the
0N/A<
A HREF="core.html#servertype">ServerType</
A> directive must be set
0N/Ato tell the server how it is to run.
0N/A<
h2>Command line options</
h2>
2362N/AThe following options are recognised on the httpd command line:
2362N/A<
dt><
code>-d</
code> <
em>serverroot</
em>
0N/A<
dd>Set the initial value for the
0N/A<
em>serverroot</
em>. This can be overridden by the ServerRoot command in the
0N/A<
dt><
code>-f</
code> <
em>config</
em>
0N/A<
dd>Execute the commands in the file <
em>config</
em> on startup. If
0N/A<
em>config</
em> does not begin with a <
code>/</
code>, then it is taken to be a
0N/Apath relative to the <
A HREF="core.html#serverroot">ServerRoot</
A>. The
0N/A<
dd>Run in single-process mode, for internal debugging purposes only; the
0N/Adaemon does not detach from the terminal or fork any children. Do <
em>NOT</
em>
0N/Ause this mode to provide ordinary web service.
0N/A<
dd>Print the version of httpd, and then exit.
0N/A<
dd>Print a list of the httpd options, and then exit.
0N/A<
h2>Configuration files</
h2>
0N/AThe server will read three files for configuration directives. Any directive
0N/Amay appear in any of these files. The the names of these files are taken
0N/Ato be relative to the server root; this is set by the
0N/A<
A HREF="core.html#serverroot">ServerRoot</
A> directive, or the
0N/A<
code>-d</
code> command line flag.
0N/AConventionally, the files are:
0N/A<
dd>Contains directives that control the operation of the server daemon.
0N/AThe filename may be overridden with the <
code>-f</
code> command line flag.
0N/A<
dd>Contains directives that control the specification of documents that
0N/Athe server can provide to clients. The filename may be overridden with
0N/Athe <
A HREF="core.html#resourceconfig">ResourceConfig</
A> directive.
0N/A<
dd>Contains directives that control access to documents.
0N/AThe filename may be overridden with the
0N/AHowever, these conventions need not be adhered to.
0N/AThe server also reads a file containing mime document types; the filename
0N/AOn daemon startup, it saves the process id of the parent httpd process to
0N/A<
A HREF="core.html#pidfile">PidFile</
A> directive. The process-id is for
0N/Ause by the administrator in restarting and terminating the daemon;
0N/AA HUP signal causes the daemon to re-read its configuration files and
0N/Aa TERM signal causes it to die gracefully.
0N/AIf the process dies (or is killed) abnormally, then it will be necessary to
0N/Akill the children httpd processes.
0N/Aby default. The filename can be set using the
0N/A<
A HREF="core.html#errorlog">ErrorLog</
A> directive; different error logs can
0N/Abe set for different <
A HREF="core.html#virtualhost">virtual hosts</
A>.
0N/A<
h3>Transfer log</
h3>
0N/AThe server will typically log each request to a transfer file,
0N/Atransfer logs can be set for different <
A HREF="core.html#virtualhost">virtual