Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Geoserver #750

Open
1 task done
gustavosalguero opened this issue Feb 15, 2025 · 5 comments
Open
1 task done

[FEAT] Geoserver #750

gustavosalguero opened this issue Feb 15, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@gustavosalguero
Copy link

Is this a new feature request?

  • I have searched the existing issues

Wanted change

Could you include the config file for geoserver container?

Reason for change

I am not able to get it to work properly

Proposed code change

No response

@gustavosalguero gustavosalguero added the enhancement New feature or request label Feb 15, 2025
@LinuxServer-CI LinuxServer-CI moved this to Non-Docker Issues in Issue & PR Tracker Feb 15, 2025
@j0nnymoe
Copy link
Member

Would be helpful if you'd included what you had attempted already and also a link to the actual application you're trying to reverse proxy.

@gustavosalguero
Copy link
Author

gustavosalguero commented Feb 17, 2025

The service I'm trying to reverse proxy is https://github.com/kartoza/docker-geoserver.
I've created a subdomain.conf file with which I can access the service through https, however the links within the service redirect me to http and I get a failed response.
This is the subdomain.conf file:

  server {
   listen 443 ssl;
   listen [::]:443 ssl;

   server_name geoserver.*;

   include /config/nginx/ssl.conf;

   client_max_body_size 0;

   # enable for ldap auth (requires ldap-location.conf in the location block)
   #include /config/nginx/ldap-server.conf;

   # enable for Authelia (requires authelia-location.conf in the location block)
   #include /config/nginx/authelia-server.conf;

   # enable for Authentik (requires authentik-location.conf in the location block)
   #include /config/nginx/authentik-server.conf;

   location / {
       # enable the next two lines for http auth
       #auth_basic "Restricted";
       #auth_basic_user_file /config/nginx/.htpasswd;

       # enable for ldap auth (requires ldap-server.conf in the server block)
       #include /config/nginx/ldap-location.conf;

       # enable for Authelia (requires authelia-server.conf in the server block)
       #include /config/nginx/authelia-location.conf;

       # enable for Authentik (requires authentik-server.conf in the server block)
       #include /config/nginx/authentik-location.conf;

       include /config/nginx/proxy.conf;
       include /config/nginx/resolver.conf;
       set $upstream_app geoserver;
       set $upstream_port 8080;
       set $upstream_proto http;
       proxy_pass $upstream_proto://$upstream_app:$upstream_port;


       # Hide proxy port to prevent CSRF errors
       # proxy_hide_header X-Forwarded-Port;

   }
}

@j0nnymoe
Copy link
Member

however the links within the service redirect me to http and I get a failed response

This is likely to a configuration within geoserver and not the proxy conf, that all looks fine to me.

@j0nnymoe
Copy link
Member

Infact, it's explained here: https://github.com/kartoza/docker-geoserver?tab=readme-ov-file#proxy-base-url

@gustavosalguero
Copy link
Author

Infact, it's explained here: https://github.com/kartoza/docker-geoserver?tab=readme-ov-file#proxy-base-url

Thanks! It was as easy as adding HTTP_SCHEME=https in the docker compose file and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Non-Docker Issues
Development

No branches or pull requests

2 participants