TransWikia.com

Can't log into dockerized GeoServer while using nginx proxy rules: login breaks at j_spring_security_check

Geographic Information Systems Asked by R. M. Spies on August 11, 2021

I am currently trying to deploy as part of an app package through docker a geoserver instance that will be serving up wms tiles for geovisualization purposes. However, even though the docker-compose file that I created successfully deploys the web app, I cannot seem to log into the admin panel. I have narrowed it down to the error being something related to the nginx configuration, but I am stumped as to how to move past this error. When I log in using the admin username and password, I get a browser redirect to the url geo/geoserver/j_spring_security_check instead of a url that contains the web address for the geoserver instance in question. This of course keeps the request from getting through to the actual web server and I don’t even see this URL show up in the nginx logs from docker-compose.

Here is a minimal example docker-compose.yml with only the nginx container and the geoserver container, as well as the nginx.conf file with the relevant settings:

docker-compose.yml:

version: "3.9"
services:
  frontend:
    image: "nginx:alpine"
    volumes:
      - type: bind
        source: ./nginx.conf
        target: /etc/nginx/conf.d/nginx.conf
    ports:
      - 80:80
  geoserver:
    image: kartoza/geoserver
    ports:
      - 8080:8080

nginx.conf:

upstream geo {
    server geoserver:8080;
}

server {
    listen 80;

    location /geoserver/ {
        proxy_pass http://geo$request_uri;
    }
}

Should I be altering the proxy rules to accomodate for the login somehow?

Is there some sort of setting that I should fiddle with in the GeoServer container itself?

I would just like to stop getting stopped at the non-existent url of geo/geoserver/j_spring_security_check and to get a successful login into the admin panel. I suppose in a pinch we could always service this geoserver instance via the REST API, but being able to use the admin panel would be ideal.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP