tags:

views:

209

answers:

1

I'm trying to use Apache's mod_proxy with the AJP backend and an ajp-wsgi app server but it doesn't seem to be sending SetEnv variables to the application server.

Configuration snippet:

<Location /script>
    ProxyPass ajp://localhost:8009/script
    SetEnv FOO "barbobot"
</Location>

How do I pass environment variables from the Apache configuration to my app server?

+1  A: 

The trick is to prefix the environment varibles with AJP_, as in

<Location /script>
    ProxyPass ajp://localhost:8009/script
    SetEnv AJP_FOO "barbobot"
</Location>

See http://marc.info/?l=apache-httpd-dev&amp;m=122059722411298&amp;w=2

joeforker