Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to configure apache as reverse prxy in front of JAVA jetty web server

Jetty runnig on local netwok on http://172.16.247.65:8091/gaapa/ my config

<VirtualHost *:80>
    ServerName beta.garantovanaplatba.cz
    ProxyPreserveHost On

    ProxyHTMLLogVerbose On
    LogLevel Info

    ServerAdmin milos.broulik@keyelements.org

    ServerAlias beta.gaapa.cz

    ProxyPass / http://172.16.247.65:8091/gaapa/
    ProxyPassReverse / http://172.16.247.65:8091/gaapa/

    #ProxyHTMLEnable On
    #ProxyHTMLInterp On

    ProxyHTMLInterp On
    ProxyHTMLURLMap /gaapa/ /

    RequestHeader unset Accept-Encoding

    ErrorLog /var/log/apache2/gaapa-beta-error_log
    CustomLog /var/log/apache2/gaapa-beta-access_log combined
    SetOutputFilter proxy-html

It's just that ProxyPassReverse aint working - I have one page redirecting after commiting POST - direct acces results in

302 FOUND with LOCATION http://172.16.247.65:8091/gaapa/action/3383380055511613440/show

while proxy acces results in

302 FOUND with LOCATION http://beta.garantovanaplatba.cz/gaapa/action/3383380055511613440/show

but there is no context path gaapa on proxy server (it resilts into /gaapa/gaapa/ access via proxy) - why the heck this doesn't work?

share|improve this question
    
Some times the application generates the URLs at the / itself and it may not be possible to proxy / of web application.I am not sure if you have this situation what you can do is install http_live addon in firefox and then send requests from an internet connection different than your network and observe the header response in browser and check as what URLs the application is generating.It will not directly solve your problem but will lead you to a step further. –  Registered User Mar 8 '11 at 15:30

1 Answer 1

up vote 0 down vote accepted
ProxyPreserveHost On --> Off

Jetty is creating redirect based upon this header, so it was beta.garantovanaplatba.cz directly from jetty and ProxyPassReverse couldn't match against it!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.