Hi,
I’m trying to deploy a Jmix application behind Nginx.
I used the same nginx configuration from a previous Cuba installation:
location /myapp/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_read_timeout 3600;
proxy_connect_timeout 240;
proxy_pass http://127.0.0.1:8080/;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
}
but it doesn’t work.
On the login page, it shows the message “Server connection lost, trying to reconnect…”
Checking in the developer tools it looks like it is trying to connect
and receives a 404 error because obviously it should go to
http://MYPUBLICDOMAIN/myapp/vaadinServlet/UIDL/?v-uiId=0
Is there some additional configuration to be added to nginx to make it work?
Or is something that should be added to the jmix app code (which will make it less portable though)?
Thanks a lot for the support.
P.