1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <manualpage metafile="apachectl.xml.meta">
5 <parentdocument href="./">Programs</parentdocument>
7 <title>apachectl - Apache HTTP Server Control Interface</title>
10 <p><code>apachectl</code> is a front end to the Apache HyperText
11 Transfer Protocol (HTTP) server. It is designed to help the
12 administrator control the functioning of the Apache
13 <a href="httpd.html">httpd</a> daemon.</p>
15 <p>The <code>apachectl</code> script can operate in two modes.
16 First, it can act as a simple front-end to the <code>httpd</code>
17 command that simply sets any necessary environment variables and
18 then invokes <code>httpd</code>, passing through any command line
19 arguments. Second, <code>apachectl</code> can act as a SysV init
20 script, taking simple one-word arguments like <code>start</code>,
21 <code>restart</code>, and <code>stop</code>, and translating them
22 into appropriate signals to <code>httpd</code>.</p>
24 <p>If your Apache installation uses non-standard paths, you will
25 need to edit the <code>apachectl</code> script to set the
26 appropriate paths to the <code>httpd</code> binary. You can also
27 specify any necessary <code>httpd</code> command line arguments.
28 See the comments in the script for details.</p>
30 <p>The <code>apachectl</code> script returns a 0 exit value on
31 success, and >0 if an error occurs. For more details, view
32 the comments in the script.</p>
34 <seealso><a href="../invoking.html">Starting Apache</a></seealso>
35 <seealso><a href="../stopping.html">Stopping Apache</a></seealso>
36 <seealso><a href="../configuring.html">Configuration Files</a></seealso>
37 <seealso><a href="../platform/">Platform Docs</a></seealso>
38 <seealso><a href="httpd.html">httpd</a></seealso>
40 <section id="synopsis"><title>Synopsis</title>
42 <p>When acting in pass-through mode, <code>apachectl</code> can take
43 all the arguments available for the <a href="httpd.html">httpd</a>
46 <p><code><strong>apachectl</strong> [ <var>httpd-argument</var> ]</code></p>
48 <p>When acting in SysV init mode, <code>apachectl</code> takes simple,
49 one-word commands, defined below.</p>
51 <p><code><strong>apachectl </strong> <var>command</var></code></p>
55 <section id="options"><title>Options</title>
57 <p>Only the SysV init-style options are defined here. Other arguments
58 are defined on the <a href="httpd.html">httpd</a> manual page.</p>
62 <dt><code>start</code></dt>
64 <dd>Start the Apache <code>httpd</code> daemon. Gives an error if it
65 is already running. This is equivalent to <code>apachectl -k
68 <dt><code>stop</code></dt>
70 <dd>Stops the Apache <code>httpd</code> daemon. This is equivalent to
71 <code>apachectl -k stop</code>.</dd>
73 <dt><code>restart</code></dt>
75 <dd>Restarts the Apache <code>httpd</code> daemon. If the daemon is
76 not running, it is started. This command automatically checks the
77 configuration files as in <code>configtest</code> before initiating
78 the restart to make sure the daemon doesn't die. This is equivalent
79 to <code>apachectl -k restart</code>.</dd>
81 <dt><code>fullstatus</code></dt>
83 <dd>Displays a full status report from <module>mod_status</module>.
84 For this to work, you need to have <module>mod_status</module> enabled
85 on your server and a text-based browser such as <code>lynx</code>
86 available on your system. The URL used to access the status report
87 can be set by editing the <code>STATUSURL</code> variable in the
90 <dt><code>status</code></dt>
92 <dd>Displays a brief status report. Similar to the
93 <code>fullstatus</code> option, except that the list of requests
94 currently being served is omitted.</dd>
96 <dt><code>graceful</code></dt>
98 <dd>Gracefully restarts the Apache <code>httpd</code> daemon. If the
99 daemon is not running, it is started. This differs from a normal
100 restart in that currently open connections are not aborted. A side
101 effect is that old log files will not be closed immediately. This
102 means that if used in a log rotation script, a substantial delay may
103 be necessary to ensure that the old log files are closed before
104 processing them. This command automatically checks the configuration
105 files as in <code>configtest</code> before initiating the
106 restart to make sure Apache doesn't die. This is equivalent to
107 <code>apachectl -k graceful</code>.</dd>
109 <dt><code>configtest</code></dt>
111 <dd>Run a configuration file syntax test. It parses the configuration
112 files and either reports <code>Syntax Ok</code>
113 or detailed information about the particular syntax error. This is
114 equivalent to <code>apachectl -t</code>.</dd>
118 <p>The following additional option is available, but deprecated.</p>
122 <dt><code>startssl</code></dt>
124 <dd>This is equivalent to <code>apachectl -k start -DSSL</code>. We
125 recommend that you use that command explicitly, or you adjust your
126 <code>httpd.conf</code> to remove the <directive module="core"
127 type="section">IfDefine</directive> section so that SSL will always be