apache2 tomcat mod_proxy

Hi, there
I need your help :wink: this thig is killing me …

I’ve deployed my app on tomcat and want to redirect all the traffic www.example.com to www.example.com:8080/myapp
I installed apache2 with mod_proxy but running into the following issues:

If I access myapp at www.example.com:8080/myapp it’s working fine

but when I setup proxyPass on apache
ProxyRequests On
ProxyPass / http://www.example.com/myapp/
ProxyPassReverse / http://www.example.com/myapp/
and try to access www.example.com I got a vaading error while trying to access widgetset under /myapp/vaadin/…/cache.js

any idea?

Thanks!

Are you using the latest vaadin version ?
I think in some versions of this spring vaadin did not correctly detect it’s server name/port…

André
thanks for dropping by.
I guess we are running on vaadin 6.6.5

anyone managed to get apache and tomcat working with mod_proxy using vaadin 6.6.5 ?

Thanks

We use apache and mod_jk since the beginning with vaadin and see no problems at all…

In your mod_proxy config I don’t see a reference to port 8080 of the servlet engine… ?

André

Hi,

my guess is that you need to add also proxy configuration for accessing the
VAADIN
directory (containing themes and widgetsets). And you should add it before the root
ProxyPass
rule.

Something like this might work:

ProxyRequests On
ProxyPass /myapp/VAADIN http://www.example.com:8080/myapp/VAADIN
ProxyPassReverse /myapp/VAADIN http://www.example.com:8080/myapp/VAADIN
ProxyPass / http://www.example.com:8080/myapp/
ProxyPassReverse / http://www.example.com:8080/myapp/

Teemu,
Thanks a lot! It works. You made my day :wink:

just need to add / after VAADIN though
posting here the final code if anyone needs it later


ProxyRequests On
ProxyPass /myapp/VAADIN/ http://www.example.com:8080/myapp/VAADIN/
ProxyPassReverse /myapp/VAADIN/ http://www.example.com:8080/myapp/VAADIN/
ProxyPass / http://www.example.com:8080/myapp/
ProxyPassReverse / http://www.example.com:8080/myapp/

HI all,

I know this thread is old, but a comment from me for all whose reading this thread:

Be aware of using the option “ProxyRequests On”. If your server is available on internet this is may be not what you want. With “ProxyRequests On” you will have a “Open proxy” server. See at

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
http://wiki.apache.org/httpd/ProxyAbuse
https://en.wikipedia.org/wiki/Open_proxy

Regards,
Steffen

I success with following setting in httpd.conf. vaadin application running on 192.168.0.88:8080 ROOT

#ProxyRequests On
ProxyPass /VAADIN/ http://192.168.0.88:8080/VAADIN/
ProxyPassReverse /VAADIN/ http://192.168.0.88:8080/VAADIN/

ProxyPass /UIDL http://192.168.0.88:8080/UIDL
ProxyPassReverse /UIDL http://192.168.0.88:8080/UIDL

ProxyPass /crm http://192.168.0.88:8080/
ProxyPassReverse /crm http://192.168.0.88:8080/