httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50502] New: It should be possible to use ProxyPreserveHost inside a <Location> block
Date Mon, 20 Dec 2010 19:51:52 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50502

           Summary: It should be possible to use ProxyPreserveHost inside
                    a <Location> block
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: filbranden@gmail.com


Hi,

I have an enhancement to propose in mod_proxy/mod_proxy_http.

It should be possible to use ProxyPreserveHost inside a <Location> block, which
would be useful when using ProxyPass without a path parameter and sending
different subpaths to different hosts.

Example:

ProxyPass /test http://test.example.com

<Location /virtual>
  ProxyPreserveHost on
  ProxyPass http://virtual.example.com/virtual
</Location>

That way http://something.example.com/test/index.html would be proxied to
http://test.example.com/index.html with Host: test.example.com, but
http://something.example.com/virtual/subdir/index.html would be proxied to the
exact same URL, connecting on virtual.example.com:80, but sending Host:
something.example.com.

BTW, this request is based on a real situation I have, I have a proxy with two
backends for different purposes, one of them uses the Host: header content
inside the generated HTML, so I'd like to use ProxyPreserveHost on for it, the
other one uses the Host: header to decide what is the physical location of the
server (in short, it depends on a certain virtual host to be accessed) and I
would like to have ProxyPreserveHost off for those ProxyPass directives. To fix
the issue the one that uses the name passed in the Host: header inside the
generated HTML will be fixed to use relative URLs (which is the right way to
fix that) but I guess Apache should keep the flexibility of using different
settings of ProxyPreserveHost in different contexts.

Thanks,
Filipe

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message