<-
Apache > HTTP Server > Documentation > Programs

apache2ctl - Apache HTTP Server Control Interface 1i3y3i

Available Languages:  tr 

apache2ctl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the control the functioning of the Apache httpd daemon.

The apache2ctl script can operate in two modes. First, it can act as a simple front-end to the httpd.

If your Apache installation uses non-standard paths, you will need to edit the apache2ctl script to set the appropriate paths to the httpd command line arguments. See the comments in the script for details.

The apache2ctl script returns a 0 exit value on success, and >0 if an error occurs. For more details, view the comments in the script.

 Apache!

See also 27136x

top

Synopsis 5j6t5r

When acting in -through mode, apache2ctl can take all the arguments available for the httpd binary.

apache2ctl [ httpd-argument ]

When acting in SysV init mode, apache2ctl takes simple, one-word commands, defined below.

apache2ctl command

top

Options 4y664e

Only the SysV init-style options are defined here. Other arguments are defined on the httpd manual page.

start
Start the Apache httpd daemon. Gives an error if it is already running. This is equivalent to apache2ctl -k start.
stop
Stops the Apache httpd daemon. This is equivalent to apache2ctl -k stop.
restart
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 apache2ctl -k restart.
fullstatus
Displays a full status report from 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.
status
Displays a brief status report. Similar to the fullstatus option, except that the list of requests currently being served is omitted.
graceful
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 apache2ctl -k graceful.
graceful-stop
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 apache2ctl -k graceful-stop.
configtest
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 apache2ctl -t.

The following option was available in earlier versions but has been removed.

startssl
To start httpd with SSL , you should edit your configuration file to include the relevant directives and then use the normal apache2ctl start.

Available Languages:  tr 

top

Comments 2p1l6j

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our s 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 Libera.chat, or sent to our mailing lists.