]> granicus.if.org Git - apache/blob - docs/manual/programs/apachectl.html.en
Fix alignment in a <highlight> block.
[apache] / docs / manual / programs / apachectl.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
5 <!--
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7               This file is generated from xml source: DO NOT EDIT
8         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9       -->
10 <title>apachectl - Apache HTTP Server Control Interface - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
15 </script>
16
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
18 <body id="manual-page"><div id="page-header">
19 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
20 <p class="apache">Apache HTTP Server Version 2.5</p>
21 <img alt="" src="../images/feather.png" /></div>
22 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
23 <div id="path">
24 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>apachectl - Apache HTTP Server Control Interface</h1>
25 <div class="toplang">
26 <p><span>Available Languages: </span><a href="../en/programs/apachectl.html" title="English">&nbsp;en&nbsp;</a> |
27 <a href="../fr/programs/apachectl.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
28 <a href="../ko/programs/apachectl.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
29 <a href="../tr/programs/apachectl.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
30 </div>
31
32      <p><code>apachectl</code> is a front end to the Apache HyperText
33      Transfer Protocol (HTTP) server.  It is designed to help the
34      administrator control the functioning of the Apache
35      <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.</p>
36
37      <p>The <code>apachectl</code> script can operate in two modes.
38      First, it can act as a simple front-end to the <code class="program"><a href="../programs/httpd.html">httpd</a></code>
39      command that simply sets any necessary environment variables and
40      then invokes <code class="program"><a href="../programs/httpd.html">httpd</a></code>, passing through any command line
41      arguments.  Second, <code>apachectl</code> can act as a SysV init
42      script, taking simple one-word arguments like <code>start</code>,
43      <code>restart</code>, and <code>stop</code>, and translating them
44      into appropriate signals to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
45
46      <p>If your Apache installation uses non-standard paths, you will
47      need to edit the <code>apachectl</code> script to set the
48      appropriate paths to the <code class="program"><a href="../programs/httpd.html">httpd</a></code> binary.  You can also
49      specify any necessary <code class="program"><a href="../programs/httpd.html">httpd</a></code> command line arguments.
50      See the comments in the script for details.</p>
51
52      <p>The <code>apachectl</code> script returns a 0 exit value on
53      success, and &gt;0 if an error occurs.  For more details, view
54      the comments in the script.</p>
55 </div>
56 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
58 </ul><h3>See also</h3><ul class="seealso"><li><a href="../invoking.html">Starting Apache</a></li><li><a href="../stopping.html">Stopping Apache</a></li><li><a href="../configuring.html">Configuration Files</a></li><li><a href="../platform/">Platform Docs</a></li><li><code class="program"><a href="../programs/httpd.html">httpd</a></code></li><li><a href="#comments_section">Comments</a></li></ul></div>
59 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
60 <div class="section">
61 <h2><a name="synopsis" id="synopsis">Synopsis</a> <a title="Permanent link" href="#synopsis" class="permalink">&para;</a></h2>
62
63 <p>When acting in pass-through mode, <code>apachectl</code> can take
64 all the arguments available for the <code class="program"><a href="../programs/httpd.html">httpd</a></code>
65 binary.</p>
66
67 <p><code><strong>apachectl</strong> [ <var>httpd-argument</var> ]</code></p>
68
69 <p>When acting in SysV init mode, <code>apachectl</code> takes simple,
70 one-word commands, defined below.</p>
71
72 <p><code><strong>apachectl</strong> <var>command</var></code></p>
73
74 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
75 <div class="section">
76 <h2><a name="options" id="options">Options</a> <a title="Permanent link" href="#options" class="permalink">&para;</a></h2>
77
78 <p>Only the SysV init-style options are defined here.  Other arguments
79 are defined on the <code class="program"><a href="../programs/httpd.html">httpd</a></code> manual page.</p>
80
81 <dl>
82
83 <dt><code>start</code></dt>
84
85 <dd>Start the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  Gives an error if it
86 is already running.  This is equivalent to <code>apachectl -k
87 start</code>.</dd>
88
89 <dt><code>stop</code></dt>
90
91 <dd>Stops the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  This is equivalent to
92 <code>apachectl -k stop</code>.</dd>
93
94 <dt><code>restart</code></dt>
95
96 <dd>Restarts the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  If the daemon is
97 not running, it is started.  This command automatically checks the
98 configuration files as in <code>configtest</code> before initiating
99 the restart to make sure the daemon doesn't die.  This is equivalent
100 to <code>apachectl -k restart</code>.</dd>
101
102 <dt><code>fullstatus</code></dt>
103
104 <dd>Displays a full status report from <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.
105 For this to work, you need to have <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> enabled
106 on your server and a text-based browser such as <code>lynx</code>
107 available on your system.  The URL used to access the status report
108 can be set by editing the <code>STATUSURL</code> variable in the
109 script.</dd>
110
111 <dt><code>status</code></dt>
112
113 <dd>Displays a brief status report.  Similar to the
114 <code>fullstatus</code> option, except that the list of requests
115 currently being served is omitted.</dd>
116
117 <dt><code>graceful</code></dt>
118
119 <dd>Gracefully restarts the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  If the
120 daemon is not running, it is started.  This differs from a normal
121 restart in that currently open connections are not aborted.  A side
122 effect is that old log files will not be closed immediately.  This
123 means that if used in a log rotation script, a substantial delay may
124 be necessary to ensure that the old log files are closed before
125 processing them.  This command automatically checks the configuration
126 files as in <code>configtest</code> before initiating the
127 restart to make sure Apache doesn't die.  This is equivalent to
128 <code>apachectl -k graceful</code>.</dd>
129
130 <dt><code>graceful-stop</code></dt>
131
132 <dd>Gracefully stops the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.
133 This differs from a normal stop in that currently open connections are not
134 aborted.  A side effect is that old log files will not be closed immediately.
135 This is equivalent to <code>apachectl -k graceful-stop</code>.</dd>
136
137 <dt><code>configtest</code></dt>
138
139 <dd>Run a configuration file syntax test. It parses the configuration
140 files and either reports <code>Syntax Ok</code>
141 or detailed information about the particular syntax error.  This is
142 equivalent to <code>apachectl -t</code>.</dd>
143
144 </dl>
145
146 <p>The following option was available in earlier versions but has been removed.</p>
147
148 <dl>
149
150 <dt><code>startssl</code></dt>
151
152 <dd>To start <code class="program"><a href="../programs/httpd.html">httpd</a></code> with SSL support, you should edit
153 your configuration file to include the relevant directives and then
154 use the normal <code>apachectl start</code>.</dd>
155
156 </dl>
157
158 </div></div>
159 <div class="bottomlang">
160 <p><span>Available Languages: </span><a href="../en/programs/apachectl.html" title="English">&nbsp;en&nbsp;</a> |
161 <a href="../fr/programs/apachectl.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
162 <a href="../ko/programs/apachectl.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
163 <a href="../tr/programs/apachectl.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
164 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
165 <script type="text/javascript"><!--//--><![CDATA[//><!--
166 var comments_shortname = 'httpd';
167 var comments_identifier = 'http://httpd.apache.org/docs/trunk/programs/apachectl.html';
168 (function(w, d) {
169     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
170         d.write('<div id="comments_thread"><\/div>');
171         var s = d.createElement('script');
172         s.type = 'text/javascript';
173         s.async = true;
174         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
175         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
176     }
177     else {
178         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
179     }
180 })(window, document);
181 //--><!]]></script></div><div id="footer">
182 <p class="apache">Copyright 2019 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
183 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
184 if (typeof(prettyPrint) !== 'undefined') {
185     prettyPrint();
186 }
187 //--><!]]></script>
188 </body></html>