Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configuration of geoserver.conf for https reverse proxy using nginx on Ubuntu 18.04
server {
listen 80;
listen [::]:80;
if ($scheme != "https"){
return 301 https://$host$request_uri;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;
root /usr/share/nginx/www;
index index.html index.htm;
proxy_redirect off;
location /geoserver {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment