invoking.html revision e507b318e2b8f7f6a749b9fba35b1b65b560eacc
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<BODY BGCOLOR="white" TEXT="black" LINK="blue" VLINK="navy" ALINK="red">
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<!--#include virtual="header.html" -->
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe <code>httpd</code> program is usually run as a daemon which executes
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynccontinuously, handling requests. It is possible to invoke Apache by
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncthe Internet daemon <code>inetd</code> each time a connection to the HTTP
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncservice is made (use the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<A HREF="mod/core.html#servertype">ServerType</A> directive)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncbut this is not recommended.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe following options are recognized on the httpd command line:
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Set the initial value for the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<A HREF="mod/core.html#serverroot">ServerRoot</A> variable to
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<em>serverroot</em>. This can be overridden by the ServerRoot command in the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncconfiguration file. The default is <code>/usr/local/etc/httpd</code>.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Execute the commands in the file <em>config</em> on startup. If
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<em>config</em> does not begin with a <code>/</code>, then it is taken to be a
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncpath relative to the <A HREF="mod/core.html#serverroot">ServerRoot</A>. The
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Run in single-process mode, for internal debugging purposes only; the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncdaemon does not detach from the terminal or fork any children. Do <em>NOT</em>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncuse this mode to provide ordinary web service.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Print the version of httpd, and then exit.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Give a list of directives together with expected arguments and
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncplaces where the directive is valid. (New in Apache 1.2)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Give a list of all modules compiled into the server.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Print a list of the httpd options, and then exit.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe server will read three files for configuration directives. Any directive
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncmay appear in any of these files. The the names of these files are taken
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncto be relative to the server root; this is set by the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<A HREF="mod/core.html#serverroot">ServerRoot</A> directive, or the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncConventionally, the files are:
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Contains directives that control the operation of the server daemon.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe filename may be overridden with the <code>-f</code> command line flag.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Contains directives that control the specification of documents that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncthe server can provide to clients. The filename may be overridden with
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncthe <A HREF="mod/core.html#resourceconfig">ResourceConfig</A> directive.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<dd>Contains directives that control access to documents.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe filename may be overridden with the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<A HREF="mod/core.html#accessconfig">AccessConfig</A> directive.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncHowever, these conventions need not be adhered to.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe server also reads a file containing mime document types; the filename
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncis set by the <A HREF="mod/mod_mime.html#typesconfig">TypesConfig</A> directive,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncAnyone who can write to the directory where Apache is writing a
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynclog file can almost certainly gain access to the uid that the server is
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncstarted as, which is normally root. Do <EM>NOT</EM> give people write
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncaccess to the directory the logs are stored in without being aware of
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncthe consequences; see the <A HREF="misc/security_tips.html">security tips</A>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncdocument for details.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncOn daemon startup, it saves the process id of the parent httpd process to
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncthe file <code>logs/httpd.pid</code>. This filename can be changed with the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<A HREF="mod/core.html#pidfile">PidFile</A> directive. The process-id is for
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncuse by the administrator in restarting and terminating the daemon;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncA HUP or USR1 signal causes the daemon to re-read its configuration files and
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynca TERM signal causes it to die gracefully. For more information
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncsee the <a href="stopping.html">Stopping and Restarting</a> page.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncIf the process dies (or is killed) abnormally, then it will be necessary to
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynckill the children httpd processes.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe server will log error messages to a log file, <code>logs/error_log</code>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncby default. The filename can be set using the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<A HREF="mod/core.html#errorlog">ErrorLog</A> directive; different error logs can
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncbe set for different <A HREF="mod/core.html#virtualhost">virtual hosts</A>.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe server will typically log each request to a transfer file,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<code>logs/access_log</code> by default. The filename can be set using a
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<A HREF="mod/mod_log_common.html#transferlog">TransferLog</A> directive; different
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynctransfer logs can be set for different <A HREF="mod/core.html#virtualhost">virtual
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync<!--#include virtual="footer.html" -->