]> granicus.if.org Git - apache/blob - docs/manual/programs/apachectl.xml
xforms
[apache] / docs / manual / programs / apachectl.xml
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 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <manualpage metafile="apachectl.xml.meta">
24 <parentdocument href="./">Programs</parentdocument>
25
26   <title>apachectl - Apache HTTP Server Control Interface</title>
27
28 <summary>
29      <p><code>apachectl</code> is a front end to the Apache HyperText
30      Transfer Protocol (HTTP) server.  It is designed to help the
31      administrator control the functioning of the Apache
32      <program>httpd</program> daemon.</p>
33
34      <p>The <code>apachectl</code> script can operate in two modes.
35      First, it can act as a simple front-end to the <program>httpd</program>
36      command that simply sets any necessary environment variables and
37      then invokes <program>httpd</program>, passing through any command line
38      arguments.  Second, <code>apachectl</code> can act as a SysV init
39      script, taking simple one-word arguments like <code>start</code>,
40      <code>restart</code>, and <code>stop</code>, and translating them
41      into appropriate signals to <program>httpd</program>.</p>
42
43      <p>If your Apache installation uses non-standard paths, you will
44      need to edit the <code>apachectl</code> script to set the
45      appropriate paths to the <program>httpd</program> binary.  You can also
46      specify any necessary <program>httpd</program> command line arguments.
47      See the comments in the script for details.</p>
48
49      <p>The <code>apachectl</code> script returns a 0 exit value on
50      success, and &gt;0 if an error occurs.  For more details, view
51      the comments in the script.</p>
52 </summary>
53 <seealso><a href="../invoking.html">Starting Apache</a></seealso>
54 <seealso><a href="../stopping.html">Stopping Apache</a></seealso>
55 <seealso><a href="../configuring.html">Configuration Files</a></seealso>
56 <seealso><a href="../platform/">Platform Docs</a></seealso>
57 <seealso><program>httpd</program></seealso>
58
59 <section id="synopsis"><title>Synopsis</title>
60
61 <p>When acting in pass-through mode, <code>apachectl</code> can take
62 all the arguments available for the <program>httpd</program>
63 binary.</p>
64
65 <p><code><strong>apachectl</strong> [ <var>httpd-argument</var> ]</code></p>
66
67 <p>When acting in SysV init mode, <code>apachectl</code> takes simple,
68 one-word commands, defined below.</p>
69
70 <p><code><strong>apachectl</strong> <var>command</var></code></p>
71
72 </section>
73
74 <section id="options"><title>Options</title>
75
76 <p>Only the SysV init-style options are defined here.  Other arguments
77 are defined on the <program>httpd</program> manual page.</p>
78
79 <dl>
80
81 <dt><code>start</code></dt>
82
83 <dd>Start the Apache <program>httpd</program> daemon.  Gives an error if it
84 is already running.  This is equivalent to <code>apachectl -k
85 start</code>.</dd>
86
87 <dt><code>stop</code></dt>
88
89 <dd>Stops the Apache <program>httpd</program> daemon.  This is equivalent to
90 <code>apachectl -k stop</code>.</dd>
91
92 <dt><code>restart</code></dt>
93
94 <dd>Restarts the Apache <program>httpd</program> daemon.  If the daemon is
95 not running, it is started.  This command automatically checks the
96 configuration files as in <code>configtest</code> before initiating
97 the restart to make sure the daemon doesn't die.  This is equivalent
98 to <code>apachectl -k restart</code>.</dd>
99
100 <dt><code>fullstatus</code></dt>
101
102 <dd>Displays a full status report from <module>mod_status</module>.
103 For this to work, you need to have <module>mod_status</module> enabled
104 on your server and a text-based browser such as <code>lynx</code>
105 available on your system.  The URL used to access the status report
106 can be set by editing the <code>STATUSURL</code> variable in the
107 script.</dd>
108
109 <dt><code>status</code></dt>
110
111 <dd>Displays a brief status report.  Similar to the
112 <code>fullstatus</code> option, except that the list of requests
113 currently being served is omitted.</dd>
114
115 <dt><code>graceful</code></dt>
116
117 <dd>Gracefully restarts the Apache <program>httpd</program> daemon.  If the
118 daemon is not running, it is started.  This differs from a normal
119 restart in that currently open connections are not aborted.  A side
120 effect is that old log files will not be closed immediately.  This
121 means that if used in a log rotation script, a substantial delay may
122 be necessary to ensure that the old log files are closed before
123 processing them.  This command automatically checks the configuration
124 files as in <code>configtest</code> before initiating the
125 restart to make sure Apache doesn't die.  This is equivalent to
126 <code>apachectl -k graceful</code>.</dd>
127
128 <dt><code>graceful-stop</code></dt>
129
130 <dd>Gracefully stops the Apache <program>httpd</program> daemon.
131 This differs from a normal stop in that currently open connections are not
132 aborted.  A side effect is that old log files will not be closed immediately.
133 This is equivalent to <code>apachectl -k graceful-stop</code>.</dd>
134
135 <dt><code>configtest</code></dt>
136
137 <dd>Run a configuration file syntax test. It parses the configuration
138 files and either reports <code>Syntax Ok</code>
139 or detailed information about the particular syntax error.  This is
140 equivalent to <code>apachectl -t</code>.</dd>
141
142 </dl>
143
144 <p>The following option was available in earlier versions but has been removed.</p>
145
146 <dl>
147
148 <dt><code>startssl</code></dt>
149
150 <dd>To start <program>httpd</program> with SSL support, you should edit
151 your configuration file to include the relevant directives and then
152 use the normal <code>apachectl start</code>.</dd>
153
154 </dl>
155
156 </section>
157
158 </manualpage>