I am running 2 geoserver and nginx container. I want to call https://xxx.xxx.com/geoserver the other one https://xxx.xxx.com/geoserver2. The geoserver containers are running behind proxy container. This is default domain.com/geoserver configuration.
location /geoserver {
add_header Front-End-Https on;
add_header Cache-Control "public, must-revalidate";
add_header Strict-Transport-Security "max-age=2592000; includeSubdomains";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://geoserver_geoserver_1:8080/geoserver;
}
How can i call domain.com/geoserver2 I was trying some configuration but when i tried login, the domain redirect geoserver_geoserver_1 this container. but geoserver2 should be running geoserver_geoserver_2 this container.
location /geoserver2/ {
add_header Front-End-Https on;
add_header Cache-Control "public, must-revalidate";
add_header Strict-Transport-Security "max-age=2592000; includeSubdomains";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://geoserver_geoserver_2:8080/geoserver/;
proxy_redirect /geoserver /geoserver2;
}