summaryrefslogtreecommitdiff
path: root/docs/manual/programs/apachectl.xml
blob: 0f46e03034f5e247269935fcaedeebca8a144086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
<!-- $Revision: 1.10 $ -->

<!--
 Copyright 2002-2004 The Apache Software Foundation

 Licensed 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
     <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 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><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 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>