[Solved] Lighttpd config error: parser failure

Added by james-bp about 2 months ago

Hi guys,

I've recently developed a strange Lighttpd config error (note: this config has been working for weeks without changes). The offending line of the lighttpd.conf is:

include_shell "/usr/share/lighttpd/"

and the error message I get in my logs:

(configfile.c.957) source: /usr/share/lighttpd/ line: 1 pos: 16 parser failed somehow near here: account
(configfile.c.957) source: /etc/lighttpd/ line: 41 pos: 14 parser failed somehow near here: (EOL)

From a glance at the perl, it just builds the mimetype.assign config setting based on the contents of the /etc/mime.types file. Executing the perl file manually provides the expected output and I can't see any special chars around "account" to explain why the parser suddenly fails. Lighttpd continues to run despite this config error (which surprised me a little), but it's screwing up the scripts I use to auto-generate site configs, because I check that lighttpd -t -f lighttpd.conf passes before I add a new site, which it currently never does.

Has anyone ever seen this before, or does anyone have any ideas about how to debug this further.

Other details:
OS: Raspbian Jessie on RPi2
Version: lighttpd/1.4.35


Replies (2)

RE: Lighttpd config error: parser failure - Added by gstrauss about 2 months ago

$ ls -l /etc/mime.types
It is likely that the contents of that file changed. Look at the syntax on the line containing "account" in /etc/mime.types and consider commenting it out.

As an aside, lighttpd 1.4.35 is quite old. You should consider upgrading to Raspbian Stretch.

RE: [Solved] Lighttpd config error: parser failure - Added by gstrauss 19 days ago

A line containing 'account' with nothing else, e.g. no associated extension, is not valid in /etc/mime.types and will result in the warning you saw.