OpenBSD manual page server

Manual Page Search Parameters

HTTPD(1)                   OpenBSD Reference Manual                   HTTPD(1)

     httpd - Apache Hypertext Transfer Protocol Server

     httpd [-FhlLStTuvVX] [-d serverroot] [-f config] [-c directive] [-C
           directive] [-D parameter] [-R libexecdir]

     httpd is the Apache HyperText Transfer Protocol (HTTP) server program. It
     is designed to be run as a standalone daemon process. When used like this
     is will create a pool of child processes to handle requests. To stop it,
     send a TERM signal to the initial (parent) process. The PID of this pro-
     cess is written to a file as given in the configuration file.  Alterna-
     tively httpd may be invoked by the Internet daemon inetd(8) each time a
     connection to the HTTP service is made.

     Normally this service can be enabled for startup on OpenBSD by editing
     /etc/rc.conf. The -u option is of particular importance.

     This manual page only lists the command line arguments. For details of
     the directives necessary to configure httpd see the Apache manual, which
     is part of the Apache distribution or can be found at, or in /var/www/htdocs/manual. Paths in this manu-
     al page reflect those compiled into httpd by default with OpenBSD.

     -u      By default httpd will chroot(2) to the serverroot path.  The -u
             option disabled this behaviour, and returns httpd to the expanded
             "unsecure" behaviour.

             As a result of the default secure behaviour, httpd cannot access
             any objects outside ServerRoot -- this security measure is taken
             in case httpd is compromised.  This is not without drawbacks,

             CGI programs may fail due to the limited environment available
             inside this chroot space.  UserDir, of course, cannot access
             files outside the directory space.  Other modules will also have
             issues.  DocumentRoot directories or any other files needed must
             be inside ServerRoot. For this to work, pathnames inside the
             config file do not need adjustment relative to ServerRoot. For
             this option to remain secure, it is important that no files or
             directories writeable by user www or group www are created inside
             the ServerRoot.

     -R libexecdir
             This option is only available if httpd was built with the
             SHARED_CORE rule enabled which forces the httpd core code to be
             placed into a dynamic shared object (DSO) file. This file is
             searched in a hardcoded path under ServerRoot per default. Use
             this option to override.

     -d serverroot
             Set the initial value for the ServerRoot directive to serverroot.
             This can be overridden by the ServerRoot command in the configu-
             ration file.  The default is /var/www.

     -f config
             Execute the commands in the file config on startup.  If config
             does not begin with a /, then it is taken to be a path relative
             to the ServerRoot. The default is conf/httpd.conf.

     -C directive

             Process the configuration directive before reading config files.

     -c directive
             Process the configuration directive after reading config files.

     -D parameter
             Sets a configuration parameter which can be used with <IfDe-
             fine>...</IfDefine> sections in the configuration files to condi-
             tionally skip or process commands.

     -F      Run the main process in foreground. For process supervisors.

     -h      Output a short summary of available command line options.

     -l      Output a list of modules compiled into the server.

     -L      Output a list of directives together with expected arguments and
             places where the directive is valid.

     -S      Show the settings as parsed from the config file (currently only
             shows the virtualhost settings).

     -t      Run syntax tests for configuration files only, including Documen-
             tRoot checks.  The program immediately exits after these syntax
             parsing with either a return code of 0 (Syntax OK) or return code
             not equal to 0 (Syntax Error).

     -T      Run syntax tests for configuration files only, without Document-
             Root checks.  The program immediately exits after these syntax
             parsing with either a return code of 0 (Syntax OK) or return code
             not equal to 0 (Syntax Error).

     -X      Run in single-process mode, for internal debugging purposes only;
             the daemon does not detach from the terminal or fork any chil-
             dren. Do NOT use this mode to provide ordinary web service.

     -v      Print the version of httpd, and then exit.

     -V      Print the version and build parameters of httpd, and then exit.

     The documents served by httpd should not be owned by the user which httpd
     is running as (usually user www and group www). They must, however, be
     readable by this user.


     chroot(2), inetd(8), rc(8)

OpenBSD 3.2                      Sep 18, 2002                                2