server { listen 443 ssl; listen [::]:443 ssl; location / { return 301 http://msserver.fss.uu.nl$request_uri; } location /docs { return 301 https://vankesteren.github.io/server_docs; } } server { listen 80 default_server; listen [::]:80 default_server; # Turn the access log off, we don't need it access_log off; location / { # Set the proxy headers proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Configure which address the request is proxied to proxy_pass http://localhost:8787/; proxy_read_timeout 90; proxy_redirect http://localhost:8787 https://msserver.fss.uu.nl$request_uri; } location /docs { return 301 https://vankesteren.github.io/server_docs; } }