Hi,

Apologies for reposting that soon, but I've been thinking more about my question earlier today (see <http://markmail.org/message/z3rkvqjjrvecllph>). So, rather than appearing impatient, I would like to rephrase that question more clearly. Basically, I have the impression that when ProxyPreserveHost is switched on, ProxyPassReverse seems to be ignored.

I'll briefly illustrate this observation. With following settings in httpd.conf:

  ProxyPreserveHost off
  ProxyPass /apps/      http://localhost:8082/
  ProxyPassReverse /apps/    http://localhost:8082/
  ProxyPassReverseCookiePath /apps/ /

I can successfully proxy a request for <http://mydomain/apps/my_app/> to a Tomcat app at <http://localhost:8082/my_app/>. The ProxyPassReverse directive is working properly, as can be seen for requests that cause an internal redirection in the Tomcat app: <http://mydomain/apps/my_app/> correctly redirects (internally, via Tomcat) to <http://mydomain/apps/my_app/index.htm>.

Yet, when switching on ProxyPreserveHost, internal redirects via Tomcat fail:

  ProxyPreserveHost off
  ProxyPass /apps/      http://localhost:8082/
  ProxyPassReverse /apps/    http://localhost:8082/
  ProxyPassReverseCookiePath /apps/ /

A request for <http://mydomain/apps/my_app/> now redirects to <http://mydomain/my_app/index.htm>. Moreover, I have the impression /anything/ can be entered for ProxyPassReverse without making any difference, e.g.:

  ProxyPassReverse /apps/whatever/    http://localhost:8082/

This doesn't affect the redirected URL whatsoever: it always is redirected to <http://mydomain/my_app/index.htm>. However, with ProxyPreserveHost switched off, above rule does redirect the original request to <http://mydomain/apps/whatever/my_app/index.htm>, which is what I'd expect.

So, my question is: (how) can ProxyPassReverse be made to work in combination with ProxyPreserveHost?

Kind regards,

Ron

Reply via email to