当我使用CertBot将Let's Encrypt证书添加到我的网站后,当我尝试访问我的网站域时,
我得到了。ERR_TOO_MANY_REDIRECTS
一些信息:
-mywebsite 使用 django、nginx 和 Gunicorn 构建。
server {
server_name www.example.com example.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/myproject;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.example.com) …Run Code Online (Sandbox Code Playgroud)