Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Reverse Proxy issues on Apache |
|
Author |
|
micxba
Joined: 26 Aug 2013 Posts: 1 Location: USA
|
Posted: Mon 26 Aug '13 20:31 Post subject: Reverse Proxy issues on Apache |
|
|
I feel like I read just about all the help that is out there when it comes to reverse proxying and HTTPD but it appears a lot is contradicting or not really working. Any help would be greatly appreciated.
We have a simple setup - Apache HTTPD in front of a few Tomcat servers.
The proxy should translate URL's like
http://domain.com/12345 -> http://internal:90/base/xhtml/user/55555555
My vhost is currently as follows:
Code: |
Servername domain.com
ProxyRequests Off
<Proxy balancer://b1>
BalancerMember http://internal:90/ route=int1
</Proxy>
ProxyPreserveHost On
RewriteEngine On
RewriteRule ^/12345/(.*) balancer://b1/base/xhtml/user/5555555/$1 [P]
SetOutPutFilter proxy-html
ProxyPass /12345 balancer://b1/base/xhtml/user/5555555 stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse /12345 balancer://b1/base/xhtml/user/5555555
|
When I enter the external URL:
http://domain.com/12345 - I get redirected to http://domain.com/xhtml/user/55555555/login.xhtml
When I enter the external URL: http://domain.com/12345/login.xhmlt the form comes up but upon submit it redirects again to http://domain.com/xhtml/user/55555555/login.xhtml
Essentially I could get the site to work with the "long" URL but that is not desired as different scenarios will have to be satisfied down the road. I played with different variations but for some reason the destination app insists of going the /xhtml/user/..etc router.
Is there a way to force Apache to use the external URL? I tried getting it done with proxy_html_module but either I don't know what I am doing or it does not work either. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|