Feature #2054
closedAbility to change variables
Description
Variables in 1.4.23 don't seem to have the ability to be changed. I want to accomplish something like this:
var.domain = "example.com"
include "sites/vhost_php.conf"
var.domain = "nophp.com"
include "sites/vhost_no_php.conf"
Where vhost_no_php.com may contain:
server.document-root = var.basedir + var.domain + "public_html/"
However once defined, variables can not be changed, so the above method does not work.
Updated by stbuehler over 14 years ago
- Target version changed from 1.4.24 to 1.4.x
Updated by gstrauss about 8 years ago
- Status changed from New to Invalid
lighttpd gives an error if a variable is redefined, as this is typically an error when it accidentally occurs across different include files.
However, there are alternative solutions to do what you want.
One option is to put variables inside each include file, and to name the variables differently in each include file.
Another option is to use your scripting language of choice to create your templates and process them to generate your lighttpd config include files.
Also available in: Atom