晨峰 发表于 2025-12-26 11:29:54

SSL申请Let's Encrypt,提示:当前项目的服务(Nginx)配置文...

本帖最后由 晨峰 于 2025-12-26 11:37 编辑

SSL申请Let's Encrypt,提示:当前项目的服务(Nginx)配置文件被修改不支持文件验证,请选择其他方式或还原配置文件


之前部署成功过,但过期了,再部署就提示这个了





选择配置文件恢复以前的,提示错误






晨峰 发表于 2025-12-26 11:33:53

server {
    server_name cehuayun.cn;
    include /www/server/panel/vhost/nginx/extension/cehuayun.cn/*.conf;

    # SSL证书路径(替换为您的实际路径)

    # SSL强化配置
    # 静态文件
    location /static/ {
      alias /wedding/static/;
    }

    # HTTP/HTTPS代理
    location / {
      proxy_pass http://daphne_backend;
      proxy_http_version 1.1;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-Proto $scheme;
    }

    # WebSocket代理
    location /ws/ {
      proxy_pass http://daphne_backend;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $host;
    }
}

server {
    listen 80;
    server_name cehuayun.cn;
    include /www/server/panel/vhost/nginx/extension/cehuayun.cn/*.conf;
    return 301 https://$host$request_uri;
}

upstream daphne_backend {
    server 127.0.0.1:8000;
    server 127.0.0.1:8001;
}
页: [1]
查看完整版本: SSL申请Let's Encrypt,提示:当前项目的服务(Nginx)配置文...