2

hi all i have a redirection problem with mod ajp, that it always adds the application name before the desired page, for example:

if i requested the page:

http://myapp.com/mypage

it is converted to

http://myapp.com/myapp/mypage, and i get a 404 error

i don't know why such behaviour occurs, this is the configuration:

<Proxy *> AddDefaultCharset Off Order deny,allow Allow from all </Proxy> 
ProxyPass / ajp://127.0.0.1:8009/myapp/ 
ProxyPassReverse / 
ajp://127.0.0.1:8009/myapp/ 
ProxyPassReverseCookiePath /myapp/ 

this strange redirection occurs exaclty when an inside application redirection occurs meaning after registration the user is redirected(application side) to the login page using response.sendRedirect , any ideas ?

Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
  • this strange redirection occurs when an inside application redirection occurs meaning after registration the user is redirected(application side) to the login page using response.sendRedirect , any ideas ? – Mahmoud Saleh Oct 05 '10 at 13:45

2 Answers2

0

You can resolve problems like this with this approach:

  • Install LiveHTTPHeaders and enable it
  • Access the application directly
  • Access the application via your reverse proxy
  • Compare the HTTP traffic of the previous cases

Most likely your application redirects user using relative URL. However your ProxyPassReverse only rewrites absolute versions. The relative version gets redirected with the page load according to your ProxyPass rule, causing the doubling of the path.

erloewe
  • 1,319
  • 9
  • 20
0

The ProxyPassReverse directive is possibly wrong. I guess it should be

ProxyPassReverse / http://myapp.com

See The Mystery of ProxyPassReverse.

fglez
  • 8,422
  • 4
  • 47
  • 78