Project

General

Profile

Actions

Feature #219

closed

New option: include_glob

Added by Anonymous over 18 years ago. Updated 4 months ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:
No

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

lighttpd-1.4.0-include_glob.diff (4.74 KB) lighttpd-1.4.0-include_glob.diff -- Aaron Walker <ka0ttic Anonymous, 2005-08-22 12:08
lighttpd-1.4.1-include_glob.diff (6.12 KB) lighttpd-1.4.1-include_glob.diff -- Aaron Walker <ka0ttic Anonymous, 2005-08-24 13:36
Actions #1

Updated by Anonymous over 18 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

Actions #2

Updated by Anonymous almost 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!

Actions #3

Updated by Anonymous almost 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.

Actions #4

Updated by icy over 15 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

Actions #5

Updated by gstrauss 4 months ago

  • Status changed from Wontfix to Fixed
  • ASK QUESTIONS IN Forums set to No

Fixed in lighttpd 1.4.40. See #1221

Actions

Also available in: Atom