<!DOCTYPE html>

<HTML><head><TITLE>Manpage of APACHECTL</TITLE>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/main.css" type="text/css">
</head>
<body>
 <header class="site-header">
 <div class="wrap"> <div class="site-title"><a href="/manpages/index.html">linux manpages</a></div>
 <div class="site-description">{"type":"documentation"}</div>
 </div>
 </header>
 <div class="page-content"><div class="wrap">
<H1>APACHECTL</H1>
Section: apachectl (8)<BR>Updated: 2005-09-20<BR><A HREF="#index">Index</A>
<A HREF="/manpages/index.html">Return to Main Contents</A><HR>

<P>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

apachectl - Apache HTTP Server Control Interface
<P>
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<BR>&nbsp;
<P>

When acting in pass-through mode, apachectl can take all the arguments available for the httpd binary.
<BR>&nbsp;
<P>

<B>apachectl</B> [ <I>httpd-argument</I> ]
<BR>&nbsp;
<P>

When acting in SysV init mode, apachectl takes simple, one-word commands, defined below.
<BR>&nbsp;
<P>

<B>apachectl</B> <I>command</I>
<BR>&nbsp;
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>SUMMARY</H2>

<BR>&nbsp;
<P>

apachectl 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 httpd daemon.
<BR>&nbsp;
<P>

The apachectl script can operate in two modes. First, it can act as a simple front-end to the httpd command that simply sets any necessary environment variables and then invokes httpd, passing through any command line arguments. Second, apachectl can act as a SysV init script, taking simple one-word arguments like start, restart, and stop, and translating them into appropriate signals to httpd.
<BR>&nbsp;
<P>

If your Apache installation uses non-standard paths, you will need to edit the apachectl script to set the appropriate paths to the httpd binary. You can also specify any necessary httpd command line arguments. See the comments in the script for details.
<BR>&nbsp;
<P>

The apachectl script returns a 0 exit value on success, and &gt;0 if an error occurs. For more details, view the comments in the script.
<BR>&nbsp;
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>

<BR>&nbsp;
<P>

Only the SysV init-style options are defined here. Other arguments are defined on the httpd manual page.
<BR>&nbsp;
<BR>&nbsp;
<DL COMPACT>
<DT>start<DD>
Start the Apache httpd daemon. Gives an error if it is already running. This is equivalent to apachectl -k start.  
<DT>stop<DD>
Stops the Apache httpd daemon. This is equivalent to apachectl -k stop.  
<DT>restart<DD>
Restarts the Apache httpd daemon. If the daemon is not running, it is started. This command automatically checks the configuration files as in configtest before initiating the restart to make sure the daemon doesn't die. This is equivalent to apachectl -k restart.  
<DT>fullstatus<DD>
Displays a full status report from mod_status. For this to work, you need to have mod_status enabled on your server and a text-based browser such as lynx available on your system. The URL used to access the status report can be set by editing the STATUSURL variable in the script.  
<DT>status<DD>
Displays a brief status report. Similar to the fullstatus option, except that the list of requests currently being served is omitted.  
<DT>graceful<DD>
Gracefully restarts the Apache httpd 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 configtest before initiating the restart to make sure Apache doesn't die. This is equivalent to apachectl -k graceful.  
<DT>graceful-stop<DD>
Gracefully stops the Apache httpd daemon. This differs from a normal stop in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This is equivalent to apachectl -k graceful-stop.  
<DT>configtest<DD>
Run a configuration file syntax test. It parses the configuration files and either reports Syntax Ok or detailed information about the particular syntax error. This is equivalent to apachectl -t.  
<BR>&nbsp;
</DL>
<P>

The following option was available in earlier versions but has been removed.
<BR>&nbsp;
<BR>&nbsp;
<DL COMPACT>
<DT>startssl<DD>
To start httpd with SSL support, you should edit your configuration file to include the relevant directives and then use the normal apachectl start.  
<BR>&nbsp;
<P>
</DL>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">SUMMARY</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/manpages/index.html">man2html</A>,
using the manual pages.<BR>
Time: 05:34:24 GMT, December 24, 2015
</div></div>
</body>
</HTML>
