httpd allows a number of
options and an optional directory argument:
httpd [-opt -opt -opt ...] [directory]
The directory argument, if present, indicates the directory to be
exported. If not present, either a rule file is be used, to export
combinations of directories, or else the default is to export the
/Public directory tree.
When the directory
parameter is given, the configuration
file is not loaded. Use of
directory parameter is discouraged - the configuration
file is necessary in most of the cases today.
-r rulefile
/etc/httpd.conf. All the
other options can be given as directives in the configuration file.
-p port
httpd assumes that it has been run by
inetd, and uses
stdin and stdout as its communication
channel. Note that port numbers under 1024 are
privileged.
-l logfile
-restart
httpd.
httpd finds the out the process number of the
running server from
PidFile
and sends it the HUP signal (HangUP). This will
cause httpd to reload its configuration files and
reopen its log files. Important: To find out the
PidFile httpd will have to read the
same configuration file as the running httpd has, so
you have to specify the same -r options on the
command line as for the actual httpd.
-gc_only
httpd periodically by cron to do
garbage collection on a cache that is used by httpd
run from the inetd daemon rather than standalone.
When httpd is not running standalone it cannot
monitor the cache, nor perform automatic garbage collection.
-v
-vv
-version
httpd and
libwww (the WWW Common Library).
DirAccess
configuration directive.
-dy
-dn
-ds
.www_browsable
README into a
directory containing instructions or notices to be read by anyone new
to the directory. httpd will by default embed any
README file in the hypertext version of a directory.
You can set these also with the DirReadme
configuration directive.
-dt
README
file, include the text of the README file at the top
of the document before the listing. Default.
-db
-dt but put the README at the
bottom, after the listing. The -db and
-dt options may be combined with -dy as
-dyb, -dty etc.
-dr
README inclusion feature.
httpd -r /usr/etc/httpd.conf -p 80
This is a standalone server running on port 80. Configuration file is
/usr/etc/httpd.conf instead of the default,
/etc/httpd.conf.
Note that if the Port directive is given in the
configuration file the -p option is not necessary (it
can be used to override the value set in the configuration file).
httpd
httpd uses its default configuration file
/etc/httpd.conf. If that file doesn't exist,
httpd exports the /Public directory tree.
This tree may contain soft links to other directory trees.
If the configuration file /etc/httpd.conf didn't define
the port number to listen to
this is an httpd reading its stdin and
writing to its stdout, so it is run by
inetd.
httpd -r /usr/local/lib/httpd.conf
The same as before, but uses /usr/local/lib/httpd.conf as
a rule file instead of the default /etc/httpd.conf.