Need help in ProxyRemoteMatch

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

 



Hi,

 

Apache Server 1:(Reverse proxy)

I have the following apache reverse proxy configured in one of the machine and it works as expected. This apache proxy sends the requests to appserver and gets the response back.

Listen 10443

<VirtualHost ApacheServer1:10443>

                ServerName XXXX

                DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

                CustomLog "logs/access1.log" common

 

                ProxyRequests off

                ProxyPass / http://AppServerIP:Port/

                ProxyPassReverse / http://AppServerIP:Port /

</VirtualHost>

 

Apache Server 2:(Forward Proxy)

There is a forward proxy configured in another machine as follows.

 

Listen 10445

<VirtualHost ApacheServer2:10445>

                ServerName xxxx

                DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

                CustomLog "logs/access2.log" common

 

                ProxyRequests On

                ProxyVia On

                <Proxy *>

Order allow,deny

allow from all

                </Proxy>

</VirtualHost>

 

Question:

in Apache Server 1, I need to identify a particular request and send that request alone to Appserver via Apache Server 2:

To do that I have added

ProxyRemoteMatch /login(.*)$ http://ApacheServer2:10445/  

in Apache server 1 configuration after the ProxyPass.

 

Now when I request for http://ApacheServer1:10443/login/login.jsp, the request goes to the Forward Proxy and then it goes to appserver which is perfect.

But login.jsp contains some image links(/static/img/JpmcLogo.gif) in the page which are not getting loaded in the browser.

 

Logs for ApacheServer1:

10.139.16.44 - - [05/May/2011:09:21:45 -0500] "GET /login/login.jsp HTTP/1.1" 200 8000

10.139.16.44 - - [05/May/2011:09:21:45 -0500] "GET /static/img/JpmcLogo.gif HTTP/1.1" 404 221

 

Logs for ApacheServer2:

10.139.16.44 - - [05/May/2011:09:21:45 -0500] "GET http://AppServer:Port/login/login.jsp HTTP/1.1" 200 8000

10.139.16.44 - - [05/May/2011:09:21:45 -0500] "GET /static/img/JpmcLogo.gif HTTP/1.1" 404 221

 

ApaceServer2 proxy should receive only requests which matches the ProxyRemoteMatch regular _expression_ /login(.*)$.

But from ApacheServer2 logs we can see that it receives the request for the image /static/img/JpmcLogo.gif. Based on the ProxyRemoteMatch regular _expression_ it should not receive this request at all, instead this image request should go to app server directly. That is the reason the images are not getting loaded in the browser and it’s failing with 404 error.

 

Am I using the ProxyRemoteMatch correctly? Someone please help to solve this.

Thanks in advance.

 

Regards,

Vasanth

 

 

This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates. This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to European legal entities.


[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