lighttpd -t: Test a lighttpd Config
lighttpd -t -f <config> parses the configuration, reports syntax errors, and exits without binding any port.
lighttpd -t is the config gate for lighttpd. -tt goes further and also runs the startup preflight so you catch more than pure syntax.
What it does
lighttpd -t reads the config file given with -f and checks it for syntax errors, then exits. -tt performs the same parse and additionally runs the server startup up to the point of binding sockets, which catches problems like missing modules that a plain -t does not. Neither starts serving traffic.
Common usage
lighttpd -t -f /etc/lighttpd/lighttpd.conf
# preflight test (parse + startup checks)
lighttpd -tt -f /etc/lighttpd/lighttpd.conf
# print the version
lighttpd -vOptions
| Flag | What it does |
|---|---|
| -t | Test the config for syntax errors and exit |
| -tt | Test syntax and run startup preflight checks |
| -f <file> | Config file to load |
| -m <dir> | Module directory (needed if modules are non-default) |
| -p | Print the parsed config (preprocessor output) |
| -v | Print version |
In CI
Prefer lighttpd -tt in CI so module-loading problems surface at check time, not at deploy. If your config loads modules from a non-standard path, pass -m so the preflight can find them. A non-zero exit gates the pipeline directly.
Common errors in CI
"source: /etc/lighttpd/lighttpd.conf line: N pos: M parser failed somehow near here: ..." pinpoints a syntax error. "can't find plugin ... mod_foo" during -tt means a module is not present at the module path; fix -m or install the module. "unknown config-key" means a directive typo or a version mismatch.