Command Line of CERN httpd

The command line syntax for 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.


Options

-l logfile
Use logfile to log the requests.
-newlog logfile
Use logfile to log the requests using the new, common logfile format. This will become the default in next version (2.16).
-gmt
Use GMT instead of localtime in logfile (localtime is default).
-nolog template
Don't log accesses from hosts matching template. Template is either an IP number mask like 128.141.*.* or a hostname template containing at most one wildcard, for example *.cern.ch
-p port
Listen to port port. Without this argument 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
Use rulefile as configuration file.
-disable METHOD
Disable METHOD on this server. You can also use the Disable directive in configuration file.
-enable METHOD
Enable METHOD on this server. You can also use the Enable directive in configuration file.
-setuid
When using user authentication, set server user-id to authenticated user id (for people who have login accounts on the same machine as the documents reside, and nobody else needs to access them).
-v
Verbose, turn on debugging messages.
-version
Print version number of httpd and libwww (the WWW Common Library)

Directory Browsing

-dy
Enable direcory browsing. Directories are returned as hypertext documents. See browsing directories. Default.
-dn
Disable directory browsing. An attempt to access a directory will generate an error response.
-ds
Selective directory browsing; enabled only for directories containing a file named .www_browsable

README Feature

-dt
For any browsable directory which contains a README file, include the text of the README file at the top of the document before the listing. Default.
-db
As -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
Disables the README inclusion feature.

Examples

        httpd -p 80 -dyt /ftp/pub
This 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.conf
The same as before, but uses /usr/local/lib/httpd.conf as a rule file instead of the default /etc/httpd.conf.


httpd@info.cern.ch