Project

General

Profile

Actions

Feature #609

closed

configuration testing

Added by Anonymous almost 19 years ago. Updated about 1 year ago.

Status:
Fixed
Priority:
Low
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

When reloading configuration, the process will die if the configuration has an error. Can this behavior be changed so that the config errors are returned and the server continues with the current working configuration instead? It would also be nice to have a flag to lighttpd that tests the configuration rather than attempting to load it. perhaps "lighttpd -t configfile" or something similar.

Actions #1

Updated by jan almost 19 years ago

  • Status changed from New to Fixed
  • Resolution set to worksforme

You mean something like:


$ ./lighttpd -t -f lighttpd.conf
Syntax OK

That's already there, since 1.4.0 IIRC.

It is not a full functional test as the plugins are not initialized, only the configfile is check if it is syntactical correct. Some errors can only be detected if you really start the server.

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Missing Feedback
Actions #3

Updated by gstrauss about 8 years ago ยท Edited

  • Description updated (diff)

With lighttpd 1.4.40 and later, you there is also a "preflight" check which tests config and loads modules, but does not bind to sockets, start backends, or piped loggers. This mode can catch many more types of config errors.

$ lighttpd -tt -f lighttpd.conf

Actions #4

Updated by gstrauss about 1 year ago

  • Status changed from Missing Feedback to Fixed
  • ASK QUESTIONS IN Forums set to No

As above, since lighttpd 1.4.40
lighttpd -tt -f /etc/lighttpd/lighttpd.conf

Numerous distros include this -tt test in their lighttpd.init (or equivalent) scripts

Actions

Also available in: Atom