"Fossies" - the Fresh Open Source Software Archive

Member "lighttpd-1.4.54/tests/var-include-sub.conf" (27 May 2019, 955 Bytes) of package /linux/www/lighttpd-1.4.54.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Generic config files source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # file to be included
    2 $HTTP["host"] =~ "^" + server.name + "$" {
    3     url.redirect = (
    4         "^/include$"       => "/good_include",
    5         "^/concat$"        => "/good_" + "concat",
    6         "^/servername1$"   => "/good_" + server.name,
    7         "^/servername2$"   => server.name + "/good_",
    8         "^/servername3$"   => "/good_" + server.name + "/",
    9         "^/var.myvar$"     => "/good_var_myvar" + var.myvar,
   10         "^/myvar$"         => "/good_myvar" + myvar,
   11         "^/number1$"       => "/good_number" + one,
   12         "^/number2$"       => one + "/good_number",
   13         "^/env$"           => "/" + env.env_test,
   14     )
   15 
   16     num = 1
   17     num2 = 2
   18     num2 += 1
   19 
   20     # without var prefix
   21     mystr = "string"
   22     mystr += "_append"
   23 
   24     # from parent
   25     one += 1
   26 
   27     url.redirect += (
   28         "^/array_append$"  => "/good_array_append",
   29         "^/string_append$" => "/good_" + mystr,
   30         "^/number_append$" => "/good_" + one,
   31     )
   32 
   33     cmd = "echo cmd_ok=456"
   34     include_shell cmd
   35     url.redirect += (
   36         "^/include_shell$" => "/good_include_shell_" + cmd_ok,
   37     )
   38 }