添加 Cloudflare SSL 导致 522 错误

添加 Cloudflare SSL 导致 522 错误

目前,我正在尝试在使用 Nginx 的 Ubuntu 服务器上安装 Cloudflare SSL 证书。我正在按照此指导关于如何执行此操作,但是一旦我按照说明成功安装证书,我的主机似乎停止工作,并且 Cloudflare 在访问我的域时显示错误 522。

我的Nginx配置:

ubuntu:/etc/nginx/sites-available$ cat ascend.so
server {
    listen 80;
    listen [::]:80;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name  ascend.so;
    root   /var/www/html/ascend.so;
    index  index.html;

    ssl_certificate /etc/ssl/certs/cloudflare_ascend.so.pem;
    ssl_certificate_key /etc/ssl/private/cloudflare_key_ascend.so.pem;
    ssl_client_certificate /etc/ssl/certs/origin-pull-ca.pem;
    ssl_verify_client on;

    client_max_body_size 100M;
  
    autoindex off;

    location / {
        try_files $uri $uri/ =404;
    }
}

$ cat /var/log/nginx显示如下:

2022/05/20 13:30:48 [error] 9267#9267: *112 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 45.9.135.234, server: ascend.so, request: "GET /db/db-admin/index.php?lang=en HTTP/1.1", host: "3.15.150.145"
2022/05/20 13:30:49 [error] 9267#9267: *113 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 45.9.135.234, server: ascend.so, request: "GET /phpMyAdmin-5/index.php?lang=en HTTP/1.1", host: "3.15.150.145"
2022/05/20 13:30:49 [error] 9267#9267: *114 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 45.9.135.234, server: ascend.so, request: "GET /phpmyadmin2017/index.php?lang=en HTTP/1.1", host: "3.15.150.145"
2022/05/20 13:30:49 [error] 9267#9267: *115 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 45.9.135.234, server: ascend.so, request: "GET /phpMyAdmin-5.1.1/index.php?lang=en HTTP/1.1", host: "3.15.150.145"
2022/05/20 13:30:49 [error] 9267#9267: *116 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 45.9.135.234, server: ascend.so, request: "GET /phpMyAdmin-5.1.0/index.php?lang=en HTTP/1.1", host: "3.15.150.145"
2022/05/20 13:30:50 [error] 9267#9267: *117 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 45.9.135.234, server: ascend.so, request: "GET /phppma/index.php?lang=en HTTP/1.1", host: "3.15.150.145"
2022/05/20 13:30:50 [error] 9267#9267: *118 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 45.9.135.234, server: ascend.so, request: "GET /phpMyAdmin-4.9.7/index.php?lang=en HTTP/1.1", host: "3.15.150.145"

这很奇怪,因为我甚至没有使用 PHP。

相关内容