| .\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
| .\" DO NOT EDIT! Generated from XML source. | |
| .\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
| .de Sh \" Subsection | |
| .br | |
| .if t .Sp | |
| .ne 5 | |
| .PP | |
| \fB\\$1\fR | |
| .PP | |
| .. | |
| .de Sp \" Vertical space (when we can't use .PP) | |
| .if t .sp .5v | |
| .if n .sp | |
| .. | |
| .de Ip \" List item | |
| .br | |
| .ie \\n(.$>=3 .ne \\$3 | |
| .el .ne 3 | |
| .IP "\\$1" \\$2 | |
| .. | |
| .TH "APACHECTL" 8 "2026-10-26" "Apache HTTP Server" "apachectl" | |
| .SH NAME | |
| apachectl \- Apache HTTP Server Control Interface | |
| .SH "SYNOPSIS" | |
| .PP | |
| When acting in pass-through mode, \fBapachectl\fR can take all the arguments available for the \fBhttpd\fR binary\&. | |
| .PP | |
| \fB\fBapachectl\fR [ \fIhttpd-argument\fR ]\fR | |
| .PP | |
| When acting in SysV init mode, \fBapachectl\fR takes simple, one-word commands, defined below\&. | |
| .PP | |
| \fB\fBapachectl\fR \fIcommand\fR\fR | |
| .SH "SUMMARY" | |
| .PP | |
| \fBapachectl\fR 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 \fBhttpd\fR daemon\&. | |
| .PP | |
| The \fBapachectl\fR script can operate in two modes\&. First, it can act as a simple front-end to the \fBhttpd\fR command that simply sets any necessary environment variables and then invokes \fBhttpd\fR, passing through any command line arguments\&. Second, \fBapachectl\fR can act as a SysV init script, taking simple one-word arguments like \fBstart\fR, \fBrestart\fR, and \fBstop\fR, and translating them into appropriate signals to \fBhttpd\fR\&. | |
| .PP | |
| If your Apache installation uses non-standard paths, you will need to edit the \fBapachectl\fR script to set the appropriate paths to the \fBhttpd\fR binary\&. You can also specify any necessary \fBhttpd\fR command line arguments\&. See the comments in the script for details\&. | |
| .PP | |
| The \fBapachectl\fR script returns a 0 exit value on success, and >0 if an error occurs\&. For more details, view the comments in the script\&. | |
| .SH "OPTIONS" | |
| .PP | |
| Only the SysV init-style options are defined here\&. Other arguments are defined on the \fBhttpd\fR manual page\&. | |
| .TP | |
| \fBstart\fR | |
| Start the Apache \fBhttpd\fR daemon\&. Gives an error if it is already running\&. This is equivalent to \fBapachectl -k start\fR\&. | |
| .TP | |
| \fBstop\fR | |
| Stops the Apache \fBhttpd\fR daemon\&. This is equivalent to \fBapachectl -k stop\fR\&. | |
| .TP | |
| \fBrestart\fR | |
| Restarts the Apache \fBhttpd\fR daemon\&. If the daemon is not running, it is started\&. This command automatically checks the configuration files as in \fBconfigtest\fR before initiating the restart to make sure the daemon doesn't die\&. This is equivalent to \fBapachectl -k restart\fR\&. | |
| .TP | |
| \fBfullstatus\fR | |
| 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 \fBlynx\fR available on your system\&. The URL used to access the status report can be set by editing the \fBSTATUSURL\fR variable in the script\&. | |
| .TP | |
| \fBstatus\fR | |
| Displays a brief status report\&. Similar to the \fBfullstatus\fR option, except that the list of requests currently being served is omitted\&. | |
| .TP | |
| \fBgraceful\fR | |
| Gracefully restarts the Apache \fBhttpd\fR 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 \fBconfigtest\fR before initiating the restart to make sure Apache doesn't die\&. This is equivalent to \fBapachectl -k graceful\fR\&. | |
| .TP | |
| \fBgraceful-stop\fR | |
| Gracefully stops the Apache \fBhttpd\fR 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 \fBapachectl -k graceful-stop\fR\&. | |
| .TP | |
| \fBconfigtest\fR | |
| Run a configuration file syntax test\&. It parses the configuration files and either reports \fBSyntax Ok\fR or detailed information about the particular syntax error\&. This is equivalent to \fBapachectl -t\fR\&. Further arguments are passed on to \fBhttpd\fR, so \fBapachectl configtest -f \fIfile\fR\fR tests the given configuration file\&. | |
| .PP | |
| The following option was available in earlier versions but has been removed\&. | |
| .TP | |
| \fBstartssl\fR | |
| To start \fBhttpd\fR with SSL support, you should edit your configuration file to include the relevant directives and then use the normal \fBapachectl start\fR\&. | |
| .SH "FILES" | |
| .PP | |
| The default paths listed below may be changed at compile time\&. Consult your local installation for the actual locations\&. | |
| .TP | |
| \fB/usr/local/apache2/bin/envvars\fR | |
| Environment variable settings sourced at startup\&. | |
| .TP | |
| \fB/usr/local/apache2/bin/httpd\fR | |
| The httpd binary invoked by apachectl\&. | |