]> granicus.if.org Git - apache/blob - docs/manual/programs/apachectl.html.en
xforms
[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         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>apachectl - Apache HTTP Server Control Interface - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <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" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
13 </script>
14
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
16 <body id="manual-page"><div id="page-header">
17 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.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>
18 <p class="apache">Apache HTTP Server Version 2.5</p>
19 <img alt="" src="../images/feather.gif" /></div>
20 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
21 <div id="path">
22 <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>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/programs/apachectl.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../ko/programs/apachectl.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
26 <a href="../tr/programs/apachectl.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
27 </div>
28
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      <code class="program"><a href="../programs/httpd.html">httpd</a></code> 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 <code class="program"><a href="../programs/httpd.html">httpd</a></code>
36      command that simply sets any necessary environment variables and
37      then invokes <code class="program"><a href="../programs/httpd.html">httpd</a></code>, 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 <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</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 <code class="program"><a href="../programs/httpd.html">httpd</a></code> binary.  You can also
46      specify any necessary <code class="program"><a href="../programs/httpd.html">httpd</a></code> 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 </div>
53 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
55 </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></ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
56 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
57 <div class="section">
58 <h2><a name="synopsis" id="synopsis">Synopsis</a></h2>
59
60 <p>When acting in pass-through mode, <code>apachectl</code> can take
61 all the arguments available for the <code class="program"><a href="../programs/httpd.html">httpd</a></code>
62 binary.</p>
63
64 <p><code><strong>apachectl</strong> [ <var>httpd-argument</var> ]</code></p>
65
66 <p>When acting in SysV init mode, <code>apachectl</code> takes simple,
67 one-word commands, defined below.</p>
68
69 <p><code><strong>apachectl</strong> <var>command</var></code></p>
70
71 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
72 <div class="section">
73 <h2><a name="options" id="options">Options</a></h2>
74
75 <p>Only the SysV init-style options are defined here.  Other arguments
76 are defined on the <code class="program"><a href="../programs/httpd.html">httpd</a></code> manual page.</p>
77
78 <dl>
79
80 <dt><code>start</code></dt>
81
82 <dd>Start the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  Gives an error if it
83 is already running.  This is equivalent to <code>apachectl -k
84 start</code>.</dd>
85
86 <dt><code>stop</code></dt>
87
88 <dd>Stops the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  This is equivalent to
89 <code>apachectl -k stop</code>.</dd>
90
91 <dt><code>restart</code></dt>
92
93 <dd>Restarts the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  If the daemon is
94 not running, it is started.  This command automatically checks the
95 configuration files as in <code>configtest</code> before initiating
96 the restart to make sure the daemon doesn't die.  This is equivalent
97 to <code>apachectl -k restart</code>.</dd>
98
99 <dt><code>fullstatus</code></dt>
100
101 <dd>Displays a full status report from <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.
102 For this to work, you need to have <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> enabled
103 on your server and a text-based browser such as <code>lynx</code>
104 available on your system.  The URL used to access the status report
105 can be set by editing the <code>STATUSURL</code> variable in the
106 script.</dd>
107
108 <dt><code>status</code></dt>
109
110 <dd>Displays a brief status report.  Similar to the
111 <code>fullstatus</code> option, except that the list of requests
112 currently being served is omitted.</dd>
113
114 <dt><code>graceful</code></dt>
115
116 <dd>Gracefully restarts the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.  If the
117 daemon is not running, it is started.  This differs from a normal
118 restart in that currently open connections are not aborted.  A side
119 effect is that old log files will not be closed immediately.  This
120 means that if used in a log rotation script, a substantial delay may
121 be necessary to ensure that the old log files are closed before
122 processing them.  This command automatically checks the configuration
123 files as in <code>configtest</code> before initiating the
124 restart to make sure Apache doesn't die.  This is equivalent to
125 <code>apachectl -k graceful</code>.</dd>
126
127 <dt><code>graceful-stop</code></dt>
128
129 <dd>Gracefully stops the Apache <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon.
130 This differs from a normal stop in that currently open connections are not
131 aborted.  A side effect is that old log files will not be closed immediately.
132 This is equivalent to <code>apachectl -k graceful-stop</code>.</dd>
133
134 <dt><code>configtest</code></dt>
135
136 <dd>Run a configuration file syntax test. It parses the configuration
137 files and either reports <code>Syntax Ok</code>
138 or detailed information about the particular syntax error.  This is
139 equivalent to <code>apachectl -t</code>.</dd>
140
141 </dl>
142
143 <p>The following option was available in earlier versions but has been removed.</p>
144
145 <dl>
146
147 <dt><code>startssl</code></dt>
148
149 <dd>To start <code class="program"><a href="../programs/httpd.html">httpd</a></code> with SSL support, you should edit
150 your configuration file to include the relevant directives and then
151 use the normal <code>apachectl start</code>.</dd>
152
153 </dl>
154
155 </div></div>
156 <div class="bottomlang">
157 <p><span>Available Languages: </span><a href="../en/programs/apachectl.html" title="English">&nbsp;en&nbsp;</a> |
158 <a href="../ko/programs/apachectl.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
159 <a href="../tr/programs/apachectl.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
160 </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>
161 <script type="text/javascript"><!--//--><![CDATA[//><!--
162 var comments_shortname = 'httpd';
163 var comments_identifier = 'http://httpd.apache.org/docs/trunk/programs/apachectl.html';
164 (function(w, d) {
165     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
166         d.write('<div id="comments_thread"><\/div>');
167         var s = d.createElement('script');
168         s.type = 'text/javascript';
169         s.async = true;
170         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
171         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
172     }
173     else {
174         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
175     }
176 })(window, document);
177 //--><!]]></script></div><div id="footer">
178 <p class="apache">Copyright 2012 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>
179 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.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[//><!--
180 if (typeof(prettyPrint) !== 'undefined') {
181     prettyPrint();
182 }
183 //--><!]]></script>
184 </body></html>