Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We're using apache httpd, to do a reverse proxy to another service running on another port.

ProxyPreserveHost On
<Location /tull>
    Order allow,deny
    Allow from all
    ProxyPass https://myserver.com:8446/tbl/tbl
            ProxyPassReverse https://myserver.com:8446/tbl/tbl
</Location>

The service running at :8446/tbl/tbl does a redirect to it self. Thus, if I do this using the proxy:

https://myserver.com/tull

When the service does a redirect to it self, it goes to:

https://myserver.com/tbl/tbl

What I wanted it to do, was a redirect to:

https://myserver.com/tull

Thus, the question becomes - Can I somehow configure apache httpd to do a reverse proxy to myserver.com:8446/tbl/tbl, but at the same time make the 8446-service think the original request is /tull ?

Cheers

share|improve this question
    
i'm not a apache expert, but i think you missing something in your proxypass directive, try with "ProxyPass /tull myserver.com:8446/tbl/tbl"; and "ProxyPassReverse /tull myserver.com:8446/tbl/tbl"; –  c4f4t0r Dec 11 '13 at 11:37
    
It's not the issue, but thanks for trying to help :) The reason why there's no /tull in the directives, is because it's all wrapped in a Location-tag. Adding /tull as well will result in an config-error on apache-restart –  Henrik Kjus Alstad Dec 11 '13 at 12:45
    
Well, to make the backend think the request is for /tull, all it uses is the requested URL, which is being explicitly set to /tbl/tbl instead of /tull - can you clarify what you want the request to the backend to look like? –  Shane Madden Dec 11 '13 at 21:52
    
I want to a request to /tull to be reverse proxied to /tbl/tbl in such a way that the service at /tbl/tbl would still regard /tull to be the URL it was asked for. Something I initially thought ProxyPreserveHost would fix...but obviously not –  Henrik Kjus Alstad Dec 11 '13 at 22:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.