Re: Currently facing some reverse proxy issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try removing your ProxyPass and ProxyPassReverse directives from inside <Location> directives and just put them directly inside your <VirtualHost>

Then use them as detailed in the docs:-

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

i.e. something like:-

ProxyPass /version_App1/subdirectory http://ipAppServer:port1/subdirectory
ProxyPassReverse /version_App1/subdirectory http://ipAppServer:port1/subdirectory

ProxyPass /version_App2/subdirectory http://ipAppServer:port2/subdirectory
ProxyPassReverse /version_App2/subdirectory http://ipAppServer:port2/subdirectory

Phil.


On 9 April 2013 16:14, Loic Paturel <guinawek@xxxxxxxxx> wrote:
Hello there,

I'll try to explain my issue as clearly as possible.
My architecture looks like this : 
some web space <---> outside server (apache server) <---> application server

I've defined a VirtualHost on some outside server ip:port and then some location inside this VHost. This configuration hosts 2 different locations to be redirected on 2 different applciations on the application server (App1 and App2). Both application are 2 different versions on the same basis.
I'd like to be able to redirect the following addresses towards the 2 applications according to their versions, such as : 
https://ip:port/version_App1/subdirectory
https://ip:port/version_App2/subdirectory

In order to do this, I've created 2 Location such as following : 
ProxyPreserveHost on
<Location /version_App1/subdirectory>
    ProxyPass http://ipAppServer:port1/subdirectory
    ProxyPassReverse http://ipAppServer:port1/subdirectory
</Location>
<Location /version_App2/subdirectory>
    ProxyPass http://ipAppServer:port2/subdirectory
    ProxyPassReverse http://ipAppServer:port2/subdirectory
</Location>

My issue concerns the response I receive from the application server which always answers with a redirection but omit the version in the response. It answers me as following : 
https://ip:port/subdirectory/common/loginView.do;jsessionid=C3E6707A5BA4FD393B5E22525F4D764B
whereas I expect  :
https://ip:port/version/subdirectory/common/loginView.do;jsessionid=C3E6707A5BA4FD393B5E22525F4D764B

Could someone help me with the rewriting of the response from the application server, to be able to keep the version inside the url I get as answer from the server and which is viewed by the user ?

I hope that I've been clear enough and that this has an easy solution. I've read some topic that I think are related to this, but no solution fit to my issue.
Thanks in advance.
Loic


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux