Hello, Here is an extract of my config : RewriteRule .* - [E=myvar:127.0.0.1:5000] ProxyPassInterpolateEnv on ProxyPass "/" "https://${myvar}/" interpolate It works as expected, however I get these warnings from Apache starting it : # service apache24 start Performing sanity check on apache24 configuration: [Sun Apr 24 17:20:43.834413 2016] [core:warn] [pid 88431] AH00111: Config variable ${be} is not defined Syntax OK Starting apache24. [Sun Apr 24 17:20:43.896887 2016] [core:warn] [pid 88432] AH00111: Config variable ${be} is not defined How to / could it be possible to avoid these warnings ? Thank you ! Ben
sorry, you will have corrected, here are the warnings : [Sun Apr 24 17:20:43.834413 2016] [core:warn] [pid 88431] AH00111: Config variable ${myvar} is not defined Syntax OK Starting apache24. [Sun Apr 24 17:20:43.896887 2016] [core:warn] [pid 88432] AH00111: Config variable ${myvar} is not defined
Any way you can set your var with any other set of directives, like <if> and setenvif? I think if you chose a var-name with a ":" character embedded in it, it would allow you to suppress those warnings. A real fix is still obviously needed for this conflict and others.
Unfortunately, my var value comes from a RewriteMap, so I can't use a different directive to set it. I tested some workarounds to switch this warning off. First one, but does not work, warning still present : SetEnvIfExpr "'a' == 'b'" myvar Second one, warning still present : SetEnv myvar I also tested addng this in envvars.env file : export myvar= Warning went away, but then, the RewriteRule does not overwrite the variable. I would like to test your variable name workaround, but how do you define a variable name with a embedded ":" in the following rule ? (as ":" is the separator between the variable name and its value) RewriteRule .* - [E=myvar:127.0.0.1:5000] Thank you Eric !
Eric, Any clue regarding your variable name workaround ? :) Many thanks !
Patch just committed ! https://github.com/apache/httpd/pull/28 Solved by not hard-fixing empty environment variables. In the above example, simply setting the following env var : myvar= will avoid the warning message. ${myvar} will then be kept like this, an populated by the RewriteRule. Thank you !