apachectl.xml revision 726f7ff1d25bc37dcc08003f42014282f977b058
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
<manualpage>
<relativepath href=".."/>
<parentdocument href="./">Programs</parentdocument>
<title>apachectl - Apache HTTP Server Control Interface</title>
<summary>
<p><code>apachectl</code> is a front end to the Apache HyperText
Transfer Protocol (HTTP) server. It is designed to help the
administrator control the functioning of the Apache
<a href="httpd.html">httpd</a> daemon.</p>
<p>The <code>apachectl</code> script can operate in two modes.
First, it can act as a simple front-end to the <code>httpd</code>
command that simply sets any necessary environment variables and
then invokes <code>httpd</code>, passing through any command line
arguments. Second, <code>apachectl</code> can act as a SysV init
script, taking simple one-word arguments like <code>start</code>,
<code>restart</code>, and <code>stop</code>, and translating them
into appropriate signals to <code>httpd</code>.</p>
<p>If your Apache installation uses non-standard paths, you will
need to edit the <code>apachectl</code> script to set the
appropriate paths to the <code>httpd</code> binary. You can also
specify any necessary <code>httpd</code> command line arugments.
See the comments in the script for details.</p>
The <code>apachectl</code> script returns a 0 exit value on
success, and &gt;0 if an error occurs. For more details, view
the comments in the script.
</summary>
<seealso><a href="/invoking.html">Starting Apache</a></seealso>
<seealso><a href="/stopping.html">Stopping Apache</a></seealso>
<seealso><a href="/configuring.html">Configuration Files</a></seealso>
<seealso><a href="/platform/">Platform Docs</a></seealso>
<seealso><a href="httpd.html">httpd</a></seealso>
<section id="synopsis"><title>Synopsis</title>
<p>When acting in pass-through mode, <code>apachectl</code> can take
all the arguments available for the <a href="httpd.html">httpd</a>
binary.</p>
<p><code><strong>apachectl</strong> [ <var>httpd-argument</var> ]</code></p>
<p>When acting in SysV init mode, <code>apachectl</code> takes simple,
one-word commands, defined below.</p>
<p><code><strong>apachectl </strong> <var>command</var></code></p>
</section>
<section id="options"><title>Options</title>
<p>Only the SysV init-style options are defined here. Other arguments
are defined on the <a href="httpd.html">httpd</a> manual page.</p>
<dl>
<dt><code>start</code></dt>
<dd>Start the Apache <code>httpd</code> daemon. Gives an error if it
is already running. This is equivalent to <code>apachectl -k
start</code>.</dd>
<dt><code>stop</code></dt>
<dd>Stops the Apache <code>httpd</code> daemon. This is equivalent to
<code>apachectl -k stop</code>.</dd>
<dt><code>restart</code></dt>
<dd>Restarts the Apache <code>httpd</code> daemon. If the daemon is
not running, it is started. This command automatically checks the
configuration files as in <code>configtest</code> before initiating
the restart to make sure the daemon doesn't die. This is equivalent
to <code>apachectl -k restart</code>.</dd>
<dt><code>fullstatus</code></dt>
<dd>Displays a full status report from <module>mod_status</module>.
For this to work, you need to have <module>mod_status</module> enabled
on your server and a text-based browser such as <code>lynx</code>
available on your system. The URL used to access the status report
can be set by editing the <code>STATUSURL</code> variable in the
script.</dd>
<dt><code>status</code></dt>
<dd>Displays a brief status report. Similar to the
<code>fullstatus</code> option, except that the list of requests
currently being served is omitted.</dd>
<dt><code>graceful</code></dt>
<dd>Gracefully restarts the Apache <code>httpd</code> daemon. If the
daemon is not running, it is started. This differs from a normal
restart in that currently open connections are not aborted. A side
effect is that old log files will not be closed immediately. This
means that if used in a log rotation script, a substantial delay may
be necessary to ensure that the old log files are closed before
processing them. This command automatically checks the configura-
tion files as in <code>configtest</code> before initiating the
restart to make sure Apache doesn't die. This is equivalent to
<code>apachectl -k graceful</code>.</dd>
<dt><code>configtest</code></dt>
<dd>Run a configuration file syntax test. It parses the configuration
files and either reports <code>Syntax Ok</code>
or detailed information about the particular syntax error. This is
equivalent to <code>apachectl -t</code>.</dd>
</dl>
<p>The following additional option is available, but deprecated.</p>
<dl>
<dt><code>startssl</code></dt>
<dd>This is equivalent to <code>apachectl -k start -DSSL</code>. We
recommend that you use that command explictly, or you adjust your
<code>httpd.conf</code> to remove the <directive module="core"
type="section">IfDefine</directive> section so that SSL will always be
available.</dd>
</dl>
</section>
</manualpage>