You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Macks, Aaron" <am...@harvardbusiness.org> on 2015/07/10 18:07:02 UTC

[users@httpd] SetenvIf warnings in 2.4

We’re migrating some configs from 2.2 to 2.4 and have run into an issue with using SetEnvIf values in proxies.  Our config looks roughly like this:
    SetEnvIf Server_Addr 123.123.123.123 LEG=QA1 APPSERVER=appserver01
…

then we proxy using that APPSERVER value:
   ProxyPassInterpolateEnv On
   ProxyPass /app ajp://${ASAPPSERVER}:8009/app interpolate
…...

This all works as expected, EXCEPT on start and configtest we get the following warnings
[Fri Jul 10 16:05:10.022214 2015] [core:warn] [pid 15478] AH00111: Config variable ${APPSERVER} is not defined

one for every time we use any of those variables.  We tried setting a default value with SetEnv, then overwriting it with setenvif, but that didn’t fix anything.  What should we tweek in the configs to conform to the 2.4 way and tamp down the useless warnings?

A

--
Aaron Macks
Systems Architect

Harvard Business Publishing
300 North Beacon St.    |   Watertown, MA 02472
(617) 783-7461                |   Fax: (617) 783-7467
www.harvardbusiness.org<http://www.harvardbusiness.org> |   Cell:(978) 317-3614


Re: [users@httpd] SetenvIf warnings in 2.4

Posted by Eric Covener <co...@gmail.com>.
On Fri, Jul 10, 2015 at 12:07 PM, Macks, Aaron
<am...@harvardbusiness.org> wrote:
> one for every time we use any of those variables.  We tried setting a
> default value with SetEnv, then overwriting it with setenvif, but that
> didn’t fix anything.  What should we tweek in the configs to conform to the
> 2.4 way and tamp down the useless warnings?


You could set native envvar ASAPPSERVER to ${ASAPPSERVER} before you
invoke apachectl, or in the envvars script it usually sources. It's a
current limitation that the syntax for variables interpolated at
startup overlaps with this runtime variable interpolation.

Your config might inadvertently disable reuse of backend connections
unless you statically list off ProxyPass for each dynamic one that
might be used. See the discussion of workers in the mod_proxy doc.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org