NAME
apachectl
—
Apache HTTP server control
interface
SYNOPSIS
apachectl |
command [...] |
DESCRIPTION
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(8) daemon.
command can be any one or more of the following options:
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.
fullstatus
- Display 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(1) available on your system. The URL used to access
the status report can be set by editing the
STATUSURL
variable in theapachectl
script. graceful
- Gracefully restart
httpd(8) 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 viaconfigtest
before initiating the restart to make sure httpd doesn't die. help
- Display a short help message.
restart
- Restart httpd(8) by sending it a
SIGHUP
. If the daemon is not running, it is started. This command automatically checks the configuration files viaconfigtest
before initiating the restart to make sure httpd(8) doesn't die. If httpd runs chrooted (default in OpenBSD) and 3rd party modules are loaded, restart may fail due to path inconsistency. Completely stop and start the daemon instead. start
- Start httpd(8). If the daemon is already running, a warning is given and no action is taken.
startssl
- Start httpd(8) with SSL enabled; see ssl(8) for more information. If the daemon is already running, a warning is given and no action is taken.
status
- Display a brief status report. Similar to the
fullstatus
option, except that the list of requests currently being served is omitted. stop
- Stop httpd(8).
EXIT STATUS
The exit codes returned are:
- 0
- operation completed successfully
- 2
- usage error
- 3
- httpd could not be started
- 4
- httpd could not be stopped
- 5
- httpd could not be started during a restart
- 6
- httpd could not be restarted during a restart
- 7
- httpd could not be restarted during a graceful restart
- 8
- configuration syntax error
When multiple arguments are given, only the error from the last one is reported.
SEE ALSO
Full documentation for httpd can be found at /usr/share/doc/html/httpd/.