> Hi , I am running resin 3.1.9 in my db server , with host name 'db' and 
> private IP address (192.168.x.x).
> In the frontend , apache httpd redirect '/servlet' pattern to the backend db 
> with the two lines :
> 
> ProxyPass /servlet http://db:8080/servlet
It looks to me like the ProxyPass directive will override the Host header of 
the request causing getServerName() return "db" (not what was actually sent 
with the request)

You should be able to control that behaviour with ProxyPreserveHost directive.
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost

--Alex
> ProxyPassReverse /servlet http://db:8080/servlet
> 
> 
> In my servlet , I want to output a valid URL , linking to the webapp's some 
> resources/apps
> But how do I get the correct [frontend] server name and port , instead of 
> 'db' and '8080' ?
> 
> In the resin.conf , I tried a lot of configuration , 
> but all got : req.getServerName() = db , and req.getServerPort() = 8080 
> 
> I need a correct URL , such as 'http://www.foobar.com/servlet/ooxx' , not 
> http://db:8080/servlet/ooxx
> 
> I tried some configurations , but all in vain :
> 
>     <host id="" host-name="www.foobar.com" root-directory="/home/foobar/www">
>       <host-alias>db</host-alias>
>       <web-app id="/" root-directory="."/>
>     </host>
> 
> and :
> 
>     <host id="db" host-name="www.foobar.com" 
> root-directory="/home/foobar/www">
>       <web-app id="/" root-directory="."/>
>     </host>
> 
> and :
> 
>     <host id="" host-name="www.foobar.com" root-directory="/home/foobar/www">
>       <web-app id="/" root-directory="."/>
>     </host>
> 
> and :
> 
>     <host id="" host-name="db" root-directory="/home/foobar/www">
>       <web-app id="/" root-directory="."/>
>     </host>
>     
> and :
> 
>     <host id="db" root-directory="/home/foobar/www">
>       <web-app id="/" root-directory="."/>
>     </host>
> 
> 
> I am running out of ideas ...
> Can somebody help me ? Thanks in advanced !
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest




_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to