server { server_name git.supernets.org; location / { client_max_body_size 4096M; proxy_pass http://localhost:3000; 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; } listen 443 ssl; ssl_certificate /etc/letsencrypt/live/git.supernets.org/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/git.supernets.org/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; } server { if ($host = git.supernets.org) { return 301 https://$host$request_uri; } listen 80; server_name git.supernets.org; return 404; }