diff options
Diffstat (limited to 'usr.sbin/httpd/htdocs/manual/invoking.html')
-rw-r--r-- | usr.sbin/httpd/htdocs/manual/invoking.html | 237 |
1 files changed, 161 insertions, 76 deletions
diff --git a/usr.sbin/httpd/htdocs/manual/invoking.html b/usr.sbin/httpd/htdocs/manual/invoking.html index b960916cfee..22f3dc07bad 100644 --- a/usr.sbin/httpd/htdocs/manual/invoking.html +++ b/usr.sbin/httpd/htdocs/manual/invoking.html @@ -15,120 +15,205 @@ <DIV ALIGN="CENTER"> <IMG SRC="images/sub.gif" ALT="[APACHE DOCUMENTATION]"> <H3> - Apache HTTP Server Version 1.2 + Apache HTTP Server Version 1.3 </H3> </DIV> -<h1 ALIGN="CENTER">Starting Apache</h1> +<H1 ALIGN="CENTER">Starting Apache</H1> -<h2>Invoking Apache</h2> -The <code>httpd</code> program is usually run as a daemon which executes -continuously, handling requests. It is possible to invoke Apache by -the Internet daemon <code>inetd</code> each time a connection to the HTTP -service is made (use the -<A HREF="mod/core.html#servertype">ServerType</A> directive) -but this is not recommended. +<H2>Invoking Apache</H2> -<h2>Command line options</h2> +On Unix, the <CODE>httpd</CODE> program is usually run as a daemon +which executes continuously, handling requests. It is possible to +invoke Apache by the Internet daemon <CODE>inetd</CODE> each time a +connection to the HTTP service is made (use the <A +HREF="mod/core.html#servertype">ServerType</A> directive) but this is +not recommended. + +<P> + +On Windows, Apache is normally run as a service on Windows NT, or as a +console application on Windows 95. See also <A +HREF="windows.html#run">running Apache for Windows</A>. + +<H2>Command line options</H2> The following options are recognized on the httpd command line: -<dl> -<dt><code>-d</code> <em>serverroot</em> -<dd>Set the initial value for the +<DL> +<DT><CODE>-d</CODE> <EM>serverroot</EM> +<DD>Set the initial value for the <A HREF="mod/core.html#serverroot">ServerRoot</A> variable to -<em>serverroot</em>. This can be overridden by the ServerRoot command in the -configuration file. The default is <code>/usr/local/etc/httpd</code>. - -<dt><code>-f</code> <em>config</em> -<dd>Execute the commands in the file <em>config</em> on startup. If -<em>config</em> does not begin with a <code>/</code>, then it is taken to be a +<EM>serverroot</EM>. This can be overridden by the ServerRoot command +in the configuration file. The default is +<CODE>/usr/local/apache</CODE> on Unix, <CODE>/apache</CODE> on +Windows and <CODE>/os2httpd</CODE> on OS/2. + +<DT><CODE>-D</CODE> <EM>name</EM> +<DD>Define a name for use in in +<A HREF="mod/core.html#ifdefine">IfDefine</A> directives. +This option can be used to optionally enable certain functionality in the +configuration file, or to use a common configuration for +several independent hosts, where host specific information is enclosed in +<IfDefine> sections. + +<DT><CODE>-f</CODE> <EM>config</EM> +<DD>Execute the commands in the file <EM>config</EM> on startup. If +<EM>config</EM> does not begin with a <CODE>/</CODE>, then it is taken to be a path relative to the <A HREF="mod/core.html#serverroot">ServerRoot</A>. The -default is <code>conf/httpd.conf</code>. +default is <CODE>conf/httpd.conf</CODE>. + +<DT><CODE>-C</CODE> <EM>"directive"</EM> +<DD>Process the given apache "directive" (just as if it had been part of a +configuration file) <STRONG>before</STRONG> actually reading the regular configuration files. + +<DT><CODE>-c</CODE> <EM>"directive"</EM> +<DD>Process the given apache "directive" <STRONG>after</STRONG> reading +all the regular configuration files. -<dt><code>-X</code> -<dd>Run in single-process mode, for internal debugging purposes only; the -daemon does not detach from the terminal or fork any children. Do <em>NOT</em> +<DT><CODE>-X</CODE> +<DD>Run in single-process mode, for internal debugging purposes only; the +daemon does not detach from the terminal or fork any children. Do <EM>NOT</EM> use this mode to provide ordinary web service. -<dt><code>-v</code> -<dd>Print the version of httpd, and then exit. +<DT><CODE>-v</CODE> +<DD>Print the version of httpd and its build date, and then exit. + +<DT><A NAME="version"><CODE>-V</CODE></A> +<DD>Print the base version of httpd, its +build date, and a list of compile time settings which influence the +behavior and performance of the apache server (<EM>e.g.</EM>, +<SAMP>-DUSE_MMAP_FILES</SAMP>), +then exit. + +<DT><A NAME="help"><CODE>-L</CODE></A> +<DD> + +Give a list of directives together with expected arguments and places +where the directive is valid, then exit. (Apache 1.3.4 and +later. Earlier versions used -l instead). + + +<DT><CODE>-l</CODE></A> +<DD> + +Give a list of all modules compiled into the server, then exit. +(Apache 1.3.4 and later. Earlier versions used -h instead).<br> -<dt><a name="help"><code>-h</code></a> -<dd>Give a list of directives together with expected arguments and -places where the directive is valid. (New in Apache 1.2) +Give a list of directives together with expected arguments and places +where the directive is valid, then exit. (Apache 1.2 to 1.3.3. Later +versions use -L instead). -<dt><code>-l</code> -<dd>Give a list of all modules compiled into the server. -<dt><code>-?</code> -<dd>Print a list of the httpd options, and then exit. -</dl> -<h2>Configuration files</h2> -The server will read three files for configuration directives. Any directive -may appear in any of these files. The the names of these files are taken -to be relative to the server root; this is set by the -<A HREF="mod/core.html#serverroot">ServerRoot</A> directive, or the -<code>-d</code> command line flag. +<DT><CODE>-h</CODE> +<DD> + +Print a list of the httpd options, then exit. (Apache 1.3.4 and +later. Earlier versions used -? instead).<br> + +Give a list of all modules compiled into the server, then exit. (Up to +Apache 1.3.3. Later versions use -l instead).<br> + + +<DT><CODE>-S</CODE> +<DD>Show the settings as parsed from the config file (currently only +shows a breakdown of the vhost settings) but do not start the +server. (Up to Apache 1.3.3, this option also started the server). + +<DT><CODE>-t</CODE> +<DD>Test the configuration file syntax (<EM>i.e.</EM>, read all configuration files +and interpret them) but do not start the server. If the configuration contains +errors, display an error message and exit with a non-zero exit status, +otherwise display "Syntax OK" and terminate with a zero exit status. + +<DT><CODE>-k</CODE> <EM>option</EM> +<DD>Windows only: signal Apache to restart or shutdown. <EM>option</EM> +is one of "shutdown" or "restart". (Apache 1.3.3 and later). + +<DT><CODE>-?</CODE> +<DD>Print a list of the httpd options, and then exit (up to Apache +1.3.3. Later version use -h instead). + +</DL> + +<H2>Configuration files</H2> +The server will read three files for configuration directives. Any +directive may appear in any of these files. The the names of these +files are taken to be relative to the server root; this is set by the +<A HREF="mod/core.html#serverroot">ServerRoot</A> directive, the +<CODE>-d</CODE> command line flag, or (on Windows only) the registry +(see <A HREF="windows.html#run">Running Apache for Windows</A>). Conventionally, the files are: -<dl> -<dt><code>conf/httpd.conf</code> -<dd>Contains directives that control the operation of the server daemon. -The filename may be overridden with the <code>-f</code> command line flag. +<DL> +<DT><CODE>conf/httpd.conf</CODE> +<DD>Contains directives that control the operation of the server daemon. +The filename may be overridden with the <CODE>-f</CODE> command line flag. -<dt><code>conf/srm.conf</code> -<dd>Contains directives that control the specification of documents that +<DT><CODE>conf/srm.conf</CODE> +<DD>Contains directives that control the specification of documents that the server can provide to clients. The filename may be overridden with the <A HREF="mod/core.html#resourceconfig">ResourceConfig</A> directive. -<dt><code>conf/access.conf</code> -<dd>Contains directives that control access to documents. +<DT><CODE>conf/access.conf</CODE> +<DD>Contains directives that control access to documents. The filename may be overridden with the <A HREF="mod/core.html#accessconfig">AccessConfig</A> directive. -</dl> +</DL> However, these conventions need not be adhered to. -<p> +<P> The server also reads a file containing mime document types; the filename -is set by the <A HREF="mod/mod_mime.html#typesconfig">TypesConfig</A> directive, -and is <code>conf/mime.types</code> by default. +is set by the <A HREF="mod/mod_mime.html#typesconfig">TypesConfig</A> +directive, +and is <CODE>conf/mime.types</CODE> by default. -<h2>Log files</h2> -<h3>security warning</h3> +<H2>Log files</H2> +<H3>security warning</H3> Anyone who can write to the directory where Apache is writing a log file can almost certainly gain access to the uid that the server is started as, which is normally root. Do <EM>NOT</EM> give people write access to the directory the logs are stored in without being aware of the consequences; see the <A HREF="misc/security_tips.html">security tips</A> document for details. -<h3>pid file</h3> -On daemon startup, it saves the process id of the parent httpd process to -the file <code>logs/httpd.pid</code>. This filename can be changed with the -<A HREF="mod/core.html#pidfile">PidFile</A> directive. The process-id is for -use by the administrator in restarting and terminating the daemon; -A HUP or USR1 signal causes the daemon to re-read its configuration files and -a TERM signal causes it to die gracefully. For more information -see the <a href="stopping.html">Stopping and Restarting</a> page. -<p> +<H3>pid file</H3> + +On startup, Apache saves the process id of the parent httpd process to +the file <CODE>logs/httpd.pid</CODE>. This filename can be changed +with the <A HREF="mod/core.html#pidfile">PidFile</A> directive. The +process-id is for use by the administrator in restarting and +terminating the daemon: on Unix, a HUP or USR1 signal causes the +daemon to re-read its configuration files and a TERM signal causes it +to die gracefully; on Windows, use the -k command line option instead. +For more information see the <A HREF="stopping.html">Stopping and +Restarting</A> page. + +<P> If the process dies (or is killed) abnormally, then it will be necessary to kill the children httpd processes. -<h3>Error log</h3> -The server will log error messages to a log file, <code>logs/error_log</code> -by default. The filename can be set using the -<A HREF="mod/core.html#errorlog">ErrorLog</A> directive; different error logs can -be set for different <A HREF="mod/core.html#virtualhost">virtual hosts</A>. +<H3>Error log</H3> -<h3>Transfer log</h3> -The server will typically log each request to a transfer file, -<code>logs/access_log</code> by default. The filename can be set using a -<A HREF="mod/mod_log_common.html#transferlog">TransferLog</A> directive; different -transfer logs can be set for different <A HREF="mod/core.html#virtualhost">virtual -hosts</A>. +The server will log error messages to a log file, by default +<CODE>logs/error_log</CODE> on Unix or <CODE>logs/error.log</CODE> on +OS/2. The filename can be set using the <A +HREF="mod/core.html#errorlog">ErrorLog</A> directive; different error +logs can be set for different <A +HREF="mod/core.html#virtualhost">virtual hosts</A>. + +<H3>Transfer log</H3> + +The server will typically log each request to a transfer file, by +default <CODE>logs/access_log</CODE> on Unix or +<CODE>logs/access.log</CODE> on OS/2. The filename can be set using a +<A HREF="mod/mod_log_config.html#transferlog">TransferLog</A> +directive or additional log files created with the <A +HREF="mod/mod_log_config.html#customlog">CustomLog</A> directive; +different transfer logs can be set for different <A +HREF="mod/core.html#virtualhost">virtual hosts</A>. <HR> -<H3 ALIGN="CENTER"> - Apache HTTP Server Version 1.2 -</H3> + <H3 ALIGN="CENTER"> + Apache HTTP Server Version 1.3 + </H3> <A HREF="./"><IMG SRC="images/index.gif" ALT="Index"></A> |