APACHECTL(8)            OpenBSD System Manager's Manual           APACHECTL(8)

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 con-
                   figuration files and either reports ``Syntax OK'' or de-
                   tailed 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 the apachectl
                   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 process-
                   ing them.  This command automatically checks the configura-
                   tion files via configtest 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 via configtest before initi-
                   ating the restart to make sure httpd(8) doesn't die.  If
                   httpd runs chrooted (default in OpenBSD) and 3rd party mod-
                   ules are loaded, restart may fail due to path inconsisten-
                   cy.  Completely stop and start the daemon instead.

     start         Start httpd(8).  If the daemon is already running, a warn-
                   ing is given and no action is taken.

     startssl      Start httpd(8) with SSL enabled; see ssl(8) for more infor-
                   mation.  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).

     The apachectl utility exits 0 on success, and >0 if an error occurs.  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
     httpd(8), ssl(8)

     Full documentation for httpd can be found at /usr/share/doc/html/httpd/.

OpenBSD 4.7                      June 7, 2008                                2
