0

i have Apache reverse proxy that is forwording requests to backend Apache that using mod_jk to connect tomcat , the application is in java/jsps in the Apache reverse proxy i have this configuration that works when there are request with out parameters in the GET request :

ProxyRequests     Off
ProxyPreserveHost On
ProxyPass /users/ http://1x2.xxx.4.xx:5xxxx/jsp/app/New/
ProxyPassReverse /users/  http://1x2.xxx.4.xx:5xxxx/jsp/app/New/
CustomLog /home/Apache/logs/proxy_log common

the mod_proxy log :

1xx.1xx.3.xx - - [20/Nov/2012:14:07:54 +0200] "GET /users/ HTTP/1.1" 200 3547
1xx.1xx.3.xx - - [20/Nov/2012:14:07:57 +0200] "GET /users/ HTTP/1.1" 200 3547
1xx.1xx.3.xx - - [20/Nov/2012:14:07:58 +0200] "GET /users/index.jsp?event=pi&id=&p= HTTP/1.1" 200 3615
1xx.1xx.3.xx - - [20/Nov/2012:14:08:02 +0200] "GET /users/ HTTP/1.1" 200 3547
1xx.1xx.3.xx - - [20/Nov/2012:14:08:07 +0200] "GET /users/index.jsp?event=pi&id=test&p=test HTTP/1.1" 200 3615
1xx.1xx.3.xx - - [20/Nov/2012:14:16:48 +0200] "GET /users/ HTTP/1.1" 200 3547
1xx.1xx.3.xx - - [20/Nov/2012:14:27:05 +0200] "GET /users/index.jsp?event=pi&id=test&p=test HTTP/1.1" 302 -
1xx.1xx.3.xx - - [20/Nov/2012:14:27:05 +0200] "GET /jsp/app/New/Home.jsp?event=Validated HTTP/1.1" 404 306
1xx.1xx.3.xx - - [20/Nov/2012:14:29:25 +0200] "GET /users/index.jsp?event=pi&id=test&p=test HTTP/1.1" 302 -
1xx.1xx.3.xx - - [20/Nov/2012:14:29:25 +0200] "GET /jsp/app/New/Home.jsp?event=Validated HTTP/1.1" 404 306
1xx.1xx.3.xx - - [20/Nov/2012:15:11:37 +0200] "GET /users/ HTTP/1.1" 200 3547
1xx.1xx.3.xx - - [20/Nov/2012:15:11:44 +0200] "GET /users/index.jsp?event=pi&id=test&p=test HTTP/1.1" 302 -
1xx.1xx.3.xx - - [20/Nov/2012:15:11:45 +0200] "GET /jsp/app/New/Home.jsp?event=Validated HTTP/1.1" 404 306

as you can see each time it getting response from :

"GET /jsp/app/New/Home.jsp?event=Validated HTTP/1.1" 404 306

it failed
the page is working when i try to work with it directly without the proxy server .

user63898
  • 29,839
  • 85
  • 272
  • 514

1 Answers1

0

You need to use Apache Httpd v2.2+ and specify the 'nocanon' option on the ProxyPass config, which tells Apache not to canonicalise the request query string:

ProxyPass /users/ http://1x2.xxx.4.xx:5xxxx/jsp/app/New/ nocanon