# Command Line Syntax

The generic syntax is:

    	webd [ options ]

## Options

The order of the options is not important. Currently available options are:-

### Getting Help

-help or -?
  Load this file from directly into the browser
-v [ a | b | c | g | p | s | t | u ]
  Verbose mode: Gives a running commentary on the program's attempts to read data in various ways. As the amount of verbose output is substantial, the `-v` option can now be followed by zero, one or more of the following flags (without space) in order to differentiate the verbose output generated:
  - a: Anchor relevant information
  - b: Bindings to local file system
  - c: Cache trace
  - g: SGML trace
  - p: Protocol module information
  - s: SGML/HTML relevant information
  - t: Thread trace
  - u: URI relevant information
  The `-v` option without any appended options shows all trace messages. An example is

      	-vpt

  showing thread and protocol trace messages
-version
  Prints out the version number of the software, and the version number of the WWW library, and exits.

### Directory Listings

-d 1*( t | b | r | n | s | y )
  This directive can be used to modify the directory listing layout. More than one option can be specified but they might be mutually exclusive. The following options are available (withour space):
  - t: Place any readme file at the top of the list (default)
  - b: Place any readme file at the bottom of the list
  - r: Ignore any readme file
  - n: Directory listings are not allowed
  - s: Directory listings are only allowed in the directories where a file ".www_browsable" is located. The content of the file is of no importance.
  - y: Directory listings are always allowed (default)
  An example is

      	-dts

  makes selective directory listings and places a README file at the top

### Log file

-l [ file ]
  Specifies a log file with a list of visited documents. The default value is "www-log"

### Rule File

-r [ file ]
  Rule file, a.k.a. configuration file. If this is specified, a rule file may be used to map URLs, and to set up other aspects of the behavior of the browser. Many rule files may be given with successive -r options, and a default rule file name may be given using the WWW_CONFIG environment variable.

### Configuration Options

-accept <n>
  Indicates the maximum number of connections to accept. When the number has been reaches then the server terminates normally. Note that because of persistent connections this may be less than the number of requests served. The default is unlimited.
-port <n>
  Indicates the port number to listen on. Default is 80
-timeout <n>
  Timeout in seconds on sockets
-backlog <n>
  Number of connections pending in the `listen` queue
-preemptive
  Preemptive (blocking) sockets