Question
Receiving 503 on Nginx after setting Cloudflare's Origin Certificate
I have a Django app running with Nginx + Gunicorn. Before, I had a Let’s Encrypt Certificate and Cloudflare SSL encryption mode as Full. After deleting the Let’s Encrypt Cert and modifying everything on my Nginx server I followed this tutorial. Now every request returns 503.
Nginx /sites-enabled/:
server {
listen 80;
listen [::]:80;
server_name my-site.com www.my-site.com;
return 302 https://$server_name$request_uri;
}
server {
# SSL configuration
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl on;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/key.pem;
ssl_client_certificate /etc/ssl/cloudflare.crt;
ssl_verify_client on;
server_name my-site.com www.my-site.com;
location = /favicon.ico {
access_log off;
log_not_found off;
}
location /static/ {
root /home/sammy/myproject/app;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
Every status shows that everything is running and active.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×