server { server_name calibre-gaming.ronnyabraham.com; client_max_body_size 100M; location / { proxy_pass http://localhost:8086; proxy_http_version 1.1; proxy_set_header Connection ""; 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; } access_log /var/log/nginx/calibre-gaming.access.log; error_log /var/log/nginx/calibre-gaming.error.log; listen 443 ssl; ssl_certificate /etc/letsencrypt/live/calibre-gaming.ronnyabraham.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/calibre-gaming.ronnyabraham.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; } server { if ($host = calibre-gaming.ronnyabraham.com) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name calibre-gaming.ronnyabraham.com; return 404; # managed by Certbot }