When started, pound
first parses its configuration file.
If any errors are detected at this stage, it prints the appropriate
diagnostics on the standard error and exits with code 1. Otherwise,
if the configuration file is OK, pound
opens sockets declared in the
listener sections, detaches itself from the controlling terminal and
starts serving incoming requests. From that moment on, all diagnostic
messages are reported via syslog
(see Logging).
To check whether the configuration file is correct, run
pound
with the -c (for check) configuration
option:
pound -c
Started this way, pound
will check the configuration file,
report any errors, if found, and exit with status 0 if there are no
errors or 1 otherwise. The option -v can be used to increase
the verbosity level. In particular, it instructs pound
to
print a confirmation message on standard error, if no errors have been
encountered (by default it would exit silently in this case).
To use alternative configuration file, supply its full pathname with the -f option, e.g.:
pound -f /etc/pound/test.cfg
If you are experimenting with new configurations, you might want to
run pound
in foreground mode and have it print its
diagnostics on the standard error. This is done by the -e
option. So, for testing purposes, it is quite common to start it this
way:
pound -e
Another option, -F, has similar effect, except that it
honors logging settings from the configuration file
(see Logging), i.e. when used with this option,
pound
will remain in foreground, but will report its
messages in accordance with its configuration file.
The following table summarizes all command line options:
Check configuration file for syntax error and exit. Exit code indicates whether the configuration is OK (0) or not (1).
Start in foreground mode and log to standard error (or standard
output, for messages with LOG_DEBUG and LOG_INFO severity levels).
This option ignores the LogLevel
configuration setting
(see Logging).
Foreground mode. Do not detach from the controlling terminal after
startup, but remain in the foreground instead. This overrides the
Daemon
configuration setting (see Daemon). The log
stream (syslog facility or stderr) requested in the configuration file
remains in effect.
Read configuration from the supplied file, instead of from the default location.
Print short command line usage summary and exit.
Sets location of the PID file. This is the file where
pound
will write its PID after startup. This option
overrides the value set by the PIDFile
configuration setting
(see PIDFile).
Verbose mode. During startup, error messages will be sent to stderr
(stdout, for LOG_DEBUG
and LOG_INFO
severities). If
pound
is configured to log to syslog, error diagnostics will be
duplicated there as well. After startup the configuration settings
take effect.
When used with -c this option also instructs pound
to print an extra confirmation message on standard error, if there are
no errors in the configuration file.
Print program version, licensing terms, and configuration flags and
exit with status 0. You can use this option, in particular, to get
the default values pound
was built with, such as
e.g. configuration file location.
Enable or disable (if prefixed with ‘no-’) additional pound
features. As of version 4.15, the following features are
implemented:
When parsing the configuration file, warn if it uses any deprecated statements. This is the default. To suppress deprecation messages, use -W no-warn-deprecated.
Resolve host names found in configuration file and returned in the
Location:
header. This is the default.
You can use -W no-dns to disable it, in order to suppress potentially lengthy network host address lookups. Make sure if your configuration file refers to backends only by their IP addresses in this case.
This setting affects also redirection location rewriting: See RewriteLocation.
This controls the include directory, i.e. the directory where
pound
looks for relative file names referred to in its
configuration file. See include directory, for a detailed
discussion of this feature.
Using -W include-dir=dir sets the new value of the include directory.
By default, the system configuration directory is used as include directory, so that any relative file names are looked up there. To disable this, use the -W no-include-dir option. This means that each relative filename used in arguments to the directives in the configuration file will be looked up in the current working directory. This is useful mainly in testsuite.