Project

General

Profile

[Solved] How to avoid the duplicate config variable error?

Added by ipetkov81 over 7 years ago

Hi all,

The problem for me is that our environment is such, that a change in the lighttpd configuration are coming from different places in both the main conf file and also in conf.d/ folder.

If there is a definition in the
lighttpd.conf, let's say server.tag = "abc",
and another one server.tag = "" in conf.d/31-common.conf,
this causes the server not being able to start. (Duplicate config variable in conditional 0 global: server.tag)

Is there a way to avoid this? Something like, saying that the configurations from conf.d to override the one from lighttpd.conf if duplicates?
All suggestions will be very appreciated.

The current version, I'm using is 1.4.29.

Thanks,
Ivo


Replies (5)

RE: How to avoid the duplicate config variable error? - Added by darix over 7 years ago

dont do duplicate config options.

RE: How to avoid the duplicate config variable error? - Added by ipetkov81 over 7 years ago

I don't have much control of this.
That is why, I'm looking for any other solution.

RE: How to avoid the duplicate config variable error? - Added by darix over 7 years ago

there arent.

and why dont you have control over the config?

RE: How to avoid the duplicate config variable error? - Added by eryretqwewrqr about 6 years ago

You shouldn't be so condescending.
Main and default configuration variables should be overrideable in a local include. That's what the whole concept is for.

It's not just in situations like the op finds himself in. Also, when debian (or any other updateable Linux) ships new config files with new defaults, one always has to implement ones changes into the new default config. Error prone and tedious, and unnecessary, if local includes can override. Other applications manage that just fine; would be nice if lighttpd could.

And just as a side note, duplicate variables are a reason for a warning, not for a service denial.

RE: [Solved] How to avoid the duplicate config variable error? - Added by gstrauss about 5 years ago

Upcoming lighttpd 1.4.46 release will allow syntax := in addition to = for assignment. := will override the prior value. YMMV depending on how sane your configuration is. See 367e62c1

    (1-5/5)