apache2ctl - Apache HTTP server control interface
When acting in SysV init mode, apache2ctl takes simple, one-word commands,
When acting in pass-through mode, apache2ctl can take all the arguments
available for the httpd binary.
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 apache2
The default Debian configuration requires the environment variables
, and APACHE_PID_FILE
be set in /etc/apache2/envvars
script returns a 0 exit value on success, and >0 if an
error occurs. For more details, view the comments in the script.
can be any one or more of the following options:
- Start the Apache daemon. Gives an error if it is already
- Stops the Apache daemon.
- Restarts the Apache daemon by sending it a SIGHUP. If the
daemon is not running, it is started. This command automatically checks
the configuration files via configtest before initiating the
restart to to catch the most obvious errors. However, it is still possible
for the daemon to die because of problems with the configuration.
- 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 setting the
APACHE_STATUSURL variable in /etc/apache2/envvars.
- Displays a brief status report. Similar to the fullstatus
option, except that the list of requests currently being served is
- Gracefully restarts the Apache daemon by sending it a
SIGUSR1. 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 via
apache2ctl configtest before initiating the restart to to catch the most
obvious errors. However, it is still possible for the daemon to die
because of problems with the configuration.
- 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.
- Run a configuration file syntax test. It parses the
configuration files and either reports Syntax Ok or information
about the particular syntax error. This test does not catch all
- Displays a short help message.
- The following option was available in earlier versions but
has been removed.
- To start httpd with SSL support, you should edit your
configuration file to include the relevant directives and then use the
normal apache2ctl start.
The behaviour of apache2ctl
can be influenced with these environment
the comments in the script for details. These variables (except
) can be set in /etc/apache2/envvars