https://issues.apache.org/bugzilla/show_bug.cgi?id=46864

           Summary: ProxyPassReverse doesn't substitute environment
                    variables
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_http
        AssignedTo: [email protected]
        ReportedBy: [email protected]


I have an apache instance where the target for proxying is determined based on
client, and the target is stuffed into an environment variable.  The
substitution works great in a RewriteRule, but under ProxyPassReverse it
doesn't so I'm left spelling out each proxy target for each rewrite.  If
substitution were working the config files could be much smaller, more elegant,
and less error-prone.

Example (just thinly blinded from real config):

  RewriteRule ^/app/(.*)$ http://%{ENV:next_proxy}:8080/app/$1 [P,L]
# this should work, but doesn't, so the next rules spell them out
#  ProxyPassReverse /app/ http://%{ENV:next_proxy}:8080/app/
  ProxyPassReverse /app/ http://localhost:8080/app/
  ProxyPassReverse /app/ http://192.168.1.1:8080/app/

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to