Chris Chen ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=627fbd3d8dd5f3006857c0b3
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiOTY4MjQzOTMzOWMxNGIzOWFhZGVkZTIyNTMxYjIxMDMiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-10491?atlOrigin=eyJpIjoiOTY4MjQzOTMzOWMxNGIzOWFhZGVkZTIyNTMxYjIxMDMiLCJwIjoiaiJ9
 ) GEOS-10491 ( 
https://osgeo-org.atlassian.net/browse/GEOS-10491?atlOrigin=eyJpIjoiOTY4MjQzOTMzOWMxNGIzOWFhZGVkZTIyNTMxYjIxMDMiLCJwIjoiaiJ9
 ) j_spring_security_check returns http instead of https when putting geoserver 
behind Nginx proxy ( 
https://osgeo-org.atlassian.net/browse/GEOS-10491?atlOrigin=eyJpIjoiOTY4MjQzOTMzOWMxNGIzOWFhZGVkZTIyNTMxYjIxMDMiLCJwIjoiaiJ9
 )

Issue Type: Bug Affects Versions: 2.18.6, 2.19.6, 2.20.4 Assignee: Unassigned 
Created: 14/May/22 4:38 PM Priority: High Reporter: Chris Chen ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=627fbd3d8dd5f3006857c0b3
 )

Hi, I ran into the issue when trying to put geoserver behind Nginx proxy and 
enabling SSL.

I tried GeoServer version 2.18.6, 2.19.6 and 2.20.4, all got the same issue 
that, j_spring_security_check returns http://xxxxx/geoserver/web , instead of 
https://xxxxx/geoserver/web

I've updated the web.xml with:

<context-param>
<param-name>PROXY_BASE_URL</param-name>
<param-value> https://xxx.xxxxxxx.com/geoserver </param-value>
</context-param>

Nginx config:

server {
listen 443 ssl;
server_name xxxx.xxxxxx.com;

ssl_certificate /home/cert/7371305__xxxxxx.com.pem;
ssl_certificate_key /home/cert/7371305__xxxxxx.com.key;

location /

{ proxy_pass http://127.0.0.1:8080/geoserver/; proxy_pass_header Set-Cookie; 
proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect 
off; }

location /geoserver/

{ proxy_pass http://127.0.0.1:8080/geoserver/; proxy_pass_header Set-Cookie; 
proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect 
off; }

}

( 
https://osgeo-org.atlassian.net/browse/GEOS-10491#add-comment?atlOrigin=eyJpIjoiOTY4MjQzOTMzOWMxNGIzOWFhZGVkZTIyNTMxYjIxMDMiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-10491#add-comment?atlOrigin=eyJpIjoiOTY4MjQzOTMzOWMxNGIzOWFhZGVkZTIyNTMxYjIxMDMiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100198- 
sha1:8950bff )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to