java - nginix setup for cas and distributed application -
i'm having distributed application different modules running on different tomcats ports. example login service (cas
) running on 8080 tomcat port, reporting service of application running on tomcat 8081 port. main application running in side different tomcat port 8083 , have single domain application i.e. www.example.com.com.
i wondering how manage using nginix
, if user getting logged in application , tries access module on other sever how session preserved.
in short how can configure nginix
distributed application i.e. application distributed on several servers.
below content on nginix file.
server { listen 80; server_name mysite.com; charset utf-8; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 443; ssl on; ssl_certificate /etc/nginx/server.crt; ssl_certificate_key /etc/nginx/server.key; server_name mysite.com; error_log /var/log/nginx/mysite-qa-error.log; charset utf-8; location ~ ^/cas/(.*)$ { proxy_pass http://localhost:140; proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; }
mysite application running on 9001 tomcat port.
how redirect nginix application cas
Comments
Post a Comment