I have several applications in a tomcar server. I am using nginx for proxy so i can achieve acceding the application from a subdomain
tomat:8080/app1 > app1.mydomain.com
tomat:8080/app2 > app2.mydomain.com
I set up a reverse proxy:
server {
listen 80;
server_name app1.mydomain.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_pass http://tomcat:8080/app1/;
}
}
I can acces the application without problem. But it is unable to keep the session. I have another appliction in jetty that runs without problem behind the ngix. Also if i acces the application directly i can operate it without problem.
Any hint?
Thanks.