diff options
author | Yann Ylavic <ylavic@apache.org> | 2020-04-22 18:30:58 +0200 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2020-04-22 18:30:58 +0200 |
commit | 48aa76e1fce1a670b68a5dc288b2d8d7a96aa237 (patch) | |
tree | f71f3a1f969dd977d4f42352ff5f495283d47c67 /docs/manual | |
parent | * modules/filters/mod_proxy_html.c: Fix proxy_html_conf.bufsz (diff) | |
download | apache2-48aa76e1fce1a670b68a5dc288b2d8d7a96aa237.tar.xz apache2-48aa76e1fce1a670b68a5dc288b2d8d7a96aa237.zip |
config: allow for environment variable substitution fallback to default value.
Make ap_resolve_env() handle the ${VAR?=default value} syntax, and update docs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876835 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual')
-rw-r--r-- | docs/manual/configuring.xml | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/docs/manual/configuring.xml b/docs/manual/configuring.xml index 672491b2a8..cfa52f361a 100644 --- a/docs/manual/configuring.xml +++ b/docs/manual/configuring.xml @@ -81,15 +81,23 @@ Server.</p> you may indent directives for clarity. Blank lines are also ignored.</p> <p>The values of variables defined with the <directive - module="core">Define</directive> of or shell environment variables can - be used in configuration file lines using the syntax <code>${VAR}</code>. + module="core">Define</directive> or of shell environment variables can + be used in configuration file lines using the syntax + <code>${VAR}</code>.<br /> If "VAR" is the name of a valid variable, the value of that variable is substituted into that spot in the configuration file line, and processing - continues as if that text were found directly in the configuration file. + continues as if that text were found directly in the configuration + file.<br /> Variables defined with <directive module="core">Define</directive> take - precedence over shell environment variables. - If the "VAR" variable is not found, the characters <code>${VAR}</code> - are left unchanged, and a warning is logged. + precedence over shell environment variables.<br /> + If the "VAR" variable is not defined, the characters <code>${VAR}</code> + are left unchanged, and a warning is logged. If instead a default value + should be substituted, the conditional form + <code>${VAR?=some default value}</code> can be used. Note that a + <strong>defined</strong> empty variable will <strong>not</strong> be + substituted with the default value, and that an empty default value like + in <code>${VAR?=}</code> is a valid substitution (which produces an empty + value if "VAR" is not defined, but no warning).<br /> Variable names may not contain colon ":" characters, to avoid clashes with <directive module="mod_rewrite">RewriteMap</directive>'s syntax.</p> |