server { if ($host = www.affine.crenam.space) { return 301 https://$host$request_uri; } # managed by Certbot if ($host = affine.crenam.space) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name affine.crenam.space www.affine.crenam.space; location / { return 301 https://$host$request_uri; } } server { listen 443 ssl http2; server_name affine.crenam.space www.affine.crenam.space; ssl_certificate /etc/letsencrypt/live/affine.crenam.space/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/affine.crenam.space/privkey.pem; # managed by Certbot # Maximum allowed upload size. client_max_body_size 100m; # Set required headers. proxy_set_header Host $http_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; # WebSocket config for the sync system. proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; # to add to configs for sso auth # include /etc/nginx/snippets/authelia-verify.conf; location / { # to add to configs for sso auth # include /etc/nginx/snippets/authelia-authrequest.conf; proxy_pass http://localhost:3010; } }