Project

General

Profile

[Solved] don't set server options in conditionals, variable: server.errorlog

Added by dmesg about 6 years ago

Hello,

I have run into the following issue after migrating my lighttpd from linux to OpenBSD 6.3:

2018-04-18 13:03:06: (configfile-glue.c.45) DEPRECATED: don't set server options in conditionals, variable: server.errorlog
2018-04-18 13:03:06: (configfile-glue.c.45) DEPRECATED: don't set server options in conditionals, variable: server.errorlog
2018-04-18 13:03:06: (configfile-glue.c.45) DEPRECATED: don't set server options in conditionals, variable: server.errorlog
2018-04-18 13:03:06: (configfile-glue.c.45) DEPRECATED: don't set server options in conditionals, variable: server.errorlog
2018-04-18 13:03:06: (configfile-glue.c.45) DEPRECATED: don't set server options in conditionals, variable: server.errorlog

Version:

lighttpd/1.4.48 (ssl) - a light and fast webserver

I would like to have separate access and error logs on not just per vhost but per ip range based, for example this worked fine until now:


               $HTTP["remoteip"] =~ "^10\.|^172\.16\.|^192\.168\.|^127\." {
                                server.errorlog = "/data/log/site.com/lan-error.log" 
                                accesslog.filename = "/data/log/site.com/lan-access.log" 
                }


Replies (4)

RE: don't set server options in conditionals, variable: server.errorlog - Added by stbuehler about 6 years ago

It (errorlog) never did work, new is only the part where you get a warning about it (accesslog works fine of course).

RE: [solved] don't set server options in conditionals, variable: server.errorlog - Added by dmesg about 6 years ago

You claim it never worked however I was still getting error messages in one of my logs at some point:

2018-04-19 19:45:19: (mod_rewrite.c.177) unexpected value for url.rewrite-if-not-file; expected list of "regex" => "subst" 
2018-04-19 20:50:27: (mod_fastcgi.c.434) FastCGI-stderr: PHP Warning:  Cannot modify header information - headers already sent by (output started at /data/www/site/index.php:3) in /data/www/site/core/src/pydio/Core/Http/TopLevelRouter.php on line 143
2018-04-19 21:02:21: (server.c.2005) server stopped by UID = 0 PID = 0
2018-04-19 21:02:21: (server.c.1412) server started (lighttpd/1.4.48)

If the error log doesn't work how should we get the error events?

RE: [solved] don't set server options in conditionals, variable: server.errorlog - Added by gstrauss about 6 years ago

server.errorlog is only permitted in the global scope. lighttpd has historically supported only a single error log.

RE: [solved] don't set server options in conditionals, variable: server.errorlog - Added by stbuehler about 6 years ago

dmesg wrote:

You claim it never worked however I was still getting error messages in one of my logs at some point:

[...]

That's because it picked one of those log files you configured and used it for everything. I wouldn't call that config "working" (at least not better than the warning you're getting now).

    (1-4/4)