You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Let's Encrypt SSL证书申请报404错误,请求技术帮助

Nginx下school-alert.cz域名Certbot证书申请失败求助

我在VPS上部署了Nginx,并配置了两个站点:api.school-alert.cz和school-alert.cz,对应的Nginx配置如下:

api.school-alert.cz 配置

server {
    server_name  api.school-alert.cz;
    index index.html index.htm;
    access_log /var/log/nginx/bmiapp.log;
    error_log  /var/log/nginx/bmiapp-error.log error;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:8080;
        proxy_redirect off;
    }
}

school-alert.cz 配置

server {
    server_name  school-alert.cz;
    index index.html index.htm;
    access_log /var/log/nginx/bmiapp.log;
    error_log  /var/log/nginx/bmiapp-error.log error;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:3000;
        proxy_redirect off;
    }
}

我已成功为api.school-alert.cz申请到SSL证书,但使用certbot --nginx或certbot -d school-alert.cz命令为school-alert.cz申请证书时,出现以下错误:

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
  Domain: school-alert.cz
  Type:   unauthorized
  Detail: 2a02:2b88:1:4::16: Invalid response from http://school-alert.cz/.well-known/acme-challenge/Qo8DXVvUsxXzGda633bnyrcMN6_pnyzP09gce11lNBQ: 404

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

Some challenges have failed.

目前两个站点均可正常访问:api.school-alert.cz:8080和school-alert.cz。尝试多日仍未解决,恳请提供帮助。

内容的提问来源于stack exchange,提问作者Fambo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.21 10:36:23