小编DAM*_*225的帖子

添加 ssl 后,nginx“ERR_TOO_MANY_REDIRECTS”

当我使用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)

ssl nginx redirect lets-encrypt certbot

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

certbot ×1

lets-encrypt ×1

nginx ×1

redirect ×1

ssl ×1