Hi, there’s a longstading issue that has been affecting several users here Jira or here Jira, the issue is that when you are using geoserver behind a proxy such as nginx and you login to the platform, it checks your credentials to https://geoserver.example.com/geoserver/j_spring_security_check, and gets a redirect to http://geoserver.example.com/geoserver/web (without https)
The problem is multifactor, but in my case I could finally solve it with these three changes:
Adding to the general server.xml a rule to read the protocol headers
**<Valve** className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="x-forwarded-for" protocolHeader="x-forwarded-proto" protocolHeaderHttpsValue="https"**/>**
Add to tomcat startup the flag from geoserver to respect the URL headers
JAVA_OPTS="-Djava.awt.headless=true -DPROXY_BASE_URL_HEADERS=true
In the global.xml file that I have customized with -DGEOSERVER_DATA_DIR=/var/opt/geoserver/data I use an expression with templates
${X-Forwarded-Proto}://${X-Forwarded-Host}/geoserver****
I would like to report into https://osgeo-org.atlassian.net the issue so at least the documentation could be improved, but with my account I can’t do it