<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
<!-- $LastChangedRevision: 421174 $ -->

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<manualpage metafile="apachectl.xml.meta">
<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
     <program>httpd</program> daemon.</p>

     <p>The <code>apachectl</code> script can operate in two modes.
     First, it can act as a simple front-end to the <program>httpd</program>
     command that simply sets any necessary environment variables and
     then invokes <program>httpd</program>, 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 <program>httpd</program>.</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 <program>httpd</program> binary.  You can also
     specify any necessary <program>httpd</program> command line arguments.
     See the comments in the script for details.</p>

     <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.</p>
</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><program>httpd</program></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 <program>httpd</program>
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 <program>httpd</program> manual page.</p>

<dl>

<dt><code>start</code></dt>

<dd>Start the Apache <program>httpd</program> 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 <program>httpd</program> daemon.  This is equivalent to
<code>apachectl -k stop</code>.</dd>

<dt><code>restart</code></dt>

<dd>Restarts the Apache <program>httpd</program> 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 <program>httpd</program> 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 configuration
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 explicitly, 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>
