Feature #219
closedNew option: include_glob
Description
Attached is a patch that adds an "include_glob" directive whose argument is a glob pattern for allowing such things as:
include_glob "extra/*.conf"
I originally patched it so that the include directive interprets it's argument as a glob pattern, but this is probably undesirable as something like 'include "foo"' will load anything with "foo" in the name.
-- Aaron Walker <ka0ttic
Files
Updated by Anonymous about 19 years ago
Attaching an updated diff. Basically I added "don't parse this config if it's been parsed already" logic to make it a little more user-friendly.
Otherwise something like:
include_glob "*.conf"
will attempt to parse the config it is currently parsing (if it ends in .conf of course), giving already defined errors once it encountered a variable/option it has already parsed.
-- Aaron Walker <ka0ttic
Updated by Anonymous over 16 years ago
Please add include_glob to 1.4 and 1.5 ASAP, as it is preferable to use included config files to add sites to an existing lighttpd running in a massive webfarm than it is to edit the main lighttpd.conf on all of those servers. Without include_glob, we will have to edit the main lighttpd.conf. With include_glob, we only have to add a file to /usr/local/etc/lighttpd directory and restart lighttpd. This is much better for site stability and rollbacks in massively scaled environments. If we have include_glob at our disposal, we can simply create websites as lighttpd config include files that get put into /usr/local/etc/lighttpd/, and have those files pushed out/installed as packages, like rpm or freebsd tbz, or whatever package system your OS uses. This would make things so much easier for sysadmins.
thanks!
Updated by Anonymous over 16 years ago
yeah yeah .... if you would have rtfm you would have found include_shell
include_shell = "cat /etc/lighttpd/vhosts.d/*.conf"
feature implemented. done.
Updated by icy about 16 years ago
- Status changed from New to Wontfix
- Patch available set to No
As mentioned, it is already possible to include files with wildcards using include_shell
Also available in: Atom