Hi!
I am trying to make my Vaadin 7 application work using an Apache Proxy. The Vaadin 7 Release Notes say:
Adds support for Apache ProxyPass and other similar proxies
. But I can’t find any tutorial on how to do this.
Assume I have the following configuration:
- The web page my Vaadin application is embedded ist hosted on http
s
://www.mydomain.com
/page
(via Apache). - The Vaadin application is hosted on http://www.mydomain.com
:8080/vaadinapp
(via Jetty). - The diplay-name (configured in web.xml) is
myapp
.
With
Vaadin 6
the following apache directives were sufficient to make all work:
ProxyPass /vaadinapp/VAADIN/ http://www.mydomain.com:8080/vaadinapp/VAADIN/
ProxyPass /vaadinapp/myapp/ http://www.mydomain.com:8080/vaadinapp/
ProxyPassReverse /vaadinapp/VAADIN/ http://www.mydomain.com:8080/vaadinapp/VAADIN/
ProxyPassReverse /vaadinapp/myapp/ http://www.mydomain.com:8080/vaadinapp/
ProxyPreserveHost on
RequestHeader set X-Forwarded-Proto "https"
With
Vaadin 7
the application will show the first screen but any further communication won’t work.
How can I get this to work?
Maybe the code of the embedding page is also interesting:
Vaadin 6:
...
<script type="text/javascript">
var vaadin = {
vaadinConfigurations: {
email: {
appUri:'/vaadinapp/myapp',
windowName:'My Vaadin App',
pathInfo: '/',
themeUri:'/vaadinapp/VAADIN/themes/mytheme',
versionInfo : {}}
}};
</script>
...
Vaadin 7:
...
<script type="text/javascript"
src="/vaadinapp/VAADIN/vaadinBootstrap.js"></script>
<script type="text/javascript">//<![CDATA[
if (!window.vaadin)
alert("Failed to load the bootstrap JavaScript: "+
"/vaadinapp/VAADIN/vaadinBootstrap.js");
/* The UI Configuration */
vaadin.initApplication("vaadinapp", {
"browserDetailsUrl": "/vaadinapp/myapp",
"widgetset": "com.vaadin.DefaultWidgetSet",
"theme": "mytheme",
"versionInfo": {"vaadinVersion": "7.0.0"},
"vaadinDir": "/vaadinapp/VAADIN/",
"heartbeatInterval": 300,
"debug": true,
"standalone": false,
"authErrMsg": {
"message": "Take note of any unsaved data, "+
"and <u>click here<\/u> to continue.",
"caption": "Authentication problem"
},
"comErrMsg": {
"message": "Take note of any unsaved data, "+
"and <u>click here<\/u> to continue.",
"caption": "Communication problem"
},
"sessExpMsg": {
"message": "Take note of any unsaved data, "+
"and <u>click here<\/u> to continue.",
"caption": "Session Expired"
}
});//]] >
</script>
...