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.
-l
logfile
-newlog
logfile
-errlog
errorlogfile
-l
or
-newlog
option), logfile.error is used.
-gmt
-nolog
template
128.141.*.*
or a
hostname template containing at most one wildcard, for example
*.cern.ch
-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.
-r
rulefile
-disable
METHOD
Disable
directive in configuration file.
-enable
METHOD
Enable
directive in configuration file.
-setuid
-v
-vv
-version
httpd
and
libwww
(the WWW Common Library)
DirAccess
configuration directive.
-dy
-dn
-ds
.www_browsable
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 -p 80 -dyt /ftp/pubThis is a standalone server running on port 80. It exports the entire
/ftp/pub
tree with browsable
directories and README
files included at the top of
directory listings.
Requesting a URL http://your.machine/misc/file.html
will
be mapped to physical file /ftp/pub/misc/file.html
by
httpd.
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. This is an
httpd
reading its stdin
and writing to its
stdout
, so it is run by inetd.
httpd -r /usr/local/lib/httpd.confThe same as before, but uses
/usr/local/lib/httpd.conf
as
a rule file instead of the default /etc/httpd.conf.