[Solved] Lighttpd not starting up with default fastcgi config
Added by thnow about 7 years ago
Hi,
I recently upgraded to 1.4.47 on 7.4.1708 from epel repo. Since then lighttpd fails to start with my fastcgi config as also with stock config (with is identical to the provided in the original package).
What you get in the logs:
2017-11-08 09:31:20: (server.c.1525) server started (lighttpd/1.4.47)
2017-11-08 09:31:20: (gw_backend.c.1208) unexpected value for xxxxx.server; expected ( "ext" => ( "backend-label" => ( "key" => "value" )))
2017-11-08 09:31:20: (server.c.1533) Configuration of plugins failed. Going down.
Lighthttp config here:
http://paste.lighttpd.net/t4#zXxy5eQty2pCL9bRprbIkqU9
Failing fastcgi config here:
http://paste.lighttpd.net/u4#2mEOKe8urN0Pibd1xoj2sFUR
All other configs are untouched / default. If fastcgi ist commented the server starts normaly
Any idea? Or anything obvious I don't see?
--
BG
Thomas
Replies (9)
RE: Lighthttpd not starting up with default fastcgi config - Added by gstrauss about 7 years ago
Are each of those entries supposed to be associated with ".php"? If so, you appear to have extra parenthesis in the subsequent php-* configs. Try this:
fastcgi.server = ( ".php" => ( "php-local" => ( ... ), "php-tcp" => ( ... ), "php-num-procs" => ( ... ), ), )
RE: Lighthttpd not starting up with default fastcgi config - Added by thnow about 7 years ago
Parenthesis is exactly set like you mentioned in the example config as in my own config. My configuration was working flawlessly in 1.4.46.
RE: Lighthttpd not starting up with default fastcgi config - Added by stbuehler about 7 years ago
I didn't see it at first either, but you have different parenthesis, yours look like this:
fastcgi.server = ( ".php" => ( "php-local" => ( ... ), ), ( "php-tcp" => ( ... ), ), ( "php-num-procs" => ( ... ), ), )
I.e. the last two blocks don't have a (extension) key in the array.
RE: Lighthttpd not starting up with default fastcgi config - Added by thnow about 7 years ago
Thanks for the enlightment. Now I see it. If i try to remove the parenthesis I just get parser errors.
root@centos7-test:[/etc/lighttpd/conf.d]# /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf 2017-11-09 15:32:37: (configfile.c.1144) source: /etc/lighttpd/conf.d/fastcgi.conf line: 24 pos: 22 parser failed somehow near here: => 2017-11-09 15:32:37: (configfile.c.1144) source: /etc/lighttpd/modules.conf line: 173 pos: 1 parser failed somehow near here: (EOL) 2017-11-09 15:32:37: (configfile.c.1144) source: /etc/lighttpd/lighttpd.conf line: 88 pos: 12 parser failed somehow near here: (EOL)
RE: Lighthttpd not starting up with default fastcgi config - Added by stbuehler about 7 years ago
Forgive us for not trusting you, but could you maybe paste your new config? :)
It is possible though that the parser doesn't accept newlines in all places.
RE: Lighthttpd not starting up with default fastcgi config - Added by thnow about 7 years ago
Sure, no problem, I reverted it, but I did it again this is actual state:
http://paste.lighttpd.net/v4#g3KQbXKwJmyzDL8LzuGiDfrj
root@centos7-test:NO DATA [/etc/lighttpd/conf.d]# /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf 2017-11-09 15:44:22: (configfile.c.1144) source: /etc/lighttpd/conf.d/fastcgi.conf line: 24 pos: 22 parser failed somehow near here: => 2017-11-09 15:44:22: (configfile.c.1144) source: /etc/lighttpd/modules.conf line: 173 pos: 1 parser failed somehow near here: (EOL) 2017-11-09 15:44:22: (configfile.c.1144) source: /etc/lighttpd/lighttpd.conf line: 88 pos: 12 parser failed somehow near here: (EOL)
RE: Lighthttpd not starting up with default fastcgi config - Added by stbuehler about 7 years ago
You still need one set of parenthesis around the three blocks; you removed them all.
RE: Lighthttpd not starting up with default fastcgi config - Added by thnow about 7 years ago
I tested it and can confirm that it works if parenthesis are set as advised. The default fastcgi.conf delivered in the tar.gz should be looked over. The pasted config runs on 1.4.46 also without problems. Im happy, Thank you!
If someone read that in the future:
fastcgi.server = ( ".php" => ( "php-local" => ( "socket" => "/tmp/php-fastcgi-1.socket", "bin-path" => "/usr/bin/php-cgi", "max-procs" => 1, "broken-scriptfilename" => "enable", ), "php-tcp" => ( "host" => "127.0.0.1", "port" => 9999, "check-local" => "disable", "broken-scriptfilename" => "enable", ), "php-num-procs" => ( "socket" => "/tmp/php-fastcgi-2.socket", "bin-path" => "/usr/bin/php-cgi", "bin-environment" => ( "PHP_FCGI_CHILDREN" => "16", "PHP_FCGI_MAX_REQUESTS" => "10000", ), "max-procs" => 5, "broken-scriptfilename" => "enable", ), ) )
RE: [Solved] Lighttpd not starting up with default fastcgi config - Added by gstrauss about 7 years ago
Thanks @thnow . I have updated doc/config/conf.d/fastcgi.conf in the source tree (and will push it to lighttpd git master soon)
While the config may have been "accepted" at lighttpd startup in prior versions, it might not have been behaving during runtime as you would have expected. The stricter config checking now rejects the incorrect, and possibly misleading, syntax.