acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

[nginx mode] "Cannot find config file for domain" when updating cert

Open cacheci opened this issue 10 months ago • 1 comments

version: 42bbd1b44af48a5accce07fa51740644b1c5f0a0 log:

[Sun Jun  8 04:16:54 AM CST 2025] _isRealNginxConf somedomain.example.com /etc/nginx/conf.d/vw.conf
[Sun Jun  8 04:16:54 AM CST 2025] _fln='16'
[Sun Jun  8 04:16:54 AM CST 2025] _start='12:server {'
[Sun Jun  8 04:16:54 AM CST 2025] _start_n='12'
[Sun Jun  8 04:16:54 AM CST 2025] _start_nn='13'
[Sun Jun  8 04:16:54 AM CST 2025] _left='    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;
    server_name somedomain.example.com;

    ssl_certificate /etc/nginx/ssl/vw.pem;
    ssl_certificate_key /etc/nginx/ssl/vw.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1.3 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
    ssl_session_cache builtin:1000 shared:SSL:10m;
    # ssl_dhparam /etc/nginx/dhparam.pem;

    client_max_body_size 525M;

    location = / {
        if ($http_upgrade != "websocket") {
            return 403;
        }
    }

    location /vw/ {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;

      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $http_cf_connecting_ip;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;

      proxy_pass http://vaultwarden-default;
    }
 }'
[Sun Jun  8 04:16:54 AM CST 2025] _end
[Sun Jun  8 04:16:54 AM CST 2025] _seg_n='    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;
    server_name somedomain.example.com;

    ssl_certificate /etc/nginx/ssl/vw.pem;
    ssl_certificate_key /etc/nginx/ssl/vw.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1.3 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
    ssl_session_cache builtin:1000 shared:SSL:10m;
    # ssl_dhparam /etc/nginx/dhparam.pem;

    client_max_body_size 525M;

    location = / {
        if ($http_upgrade != "websocket") {
            return 403;
        }
    }

    location /vw/ {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;

      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $http_cf_connecting_ip;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;

      proxy_pass http://vaultwarden-default;
    }
 }'
[Sun Jun  8 04:16:54 AM CST 2025] listen443ssl; is ssl
[Sun Jun  8 04:16:54 AM CST 2025] listen[::]:443ssl; is ssl
[Sun Jun  8 04:16:54 AM CST 2025] ssl on, skip
[Sun Jun  8 04:16:54 AM CST 2025] Cannot find config file for domain somedomain.example.com
[Sun Jun  8 04:16:54 AM CST 2025] pid
[Sun Jun  8 04:16:55 AM CST 2025] No need to restore nginx config, skipping.
[Sun Jun  8 04:16:55 AM CST 2025] _clearupdns
[Sun Jun  8 04:16:55 AM CST 2025] dns_entries
[Sun Jun  8 04:16:55 AM CST 2025] Skipping dns.
[Sun Jun  8 04:16:55 AM CST 2025] _on_issue_err
[Sun Jun  8 04:16:55 AM CST 2025] Please check log file for more details: /root/.acme.sh/acme.sh.log

nginx config related:

upstream vaultwarden-default {
  zone vaultwarden-default 64k;
  server 127.0.0.1:9080;
  keepalive 2;
}

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      "";
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;
    server_name somedomain.example.com;

    ssl_certificate /etc/nginx/ssl/vw.pem;
    ssl_certificate_key /etc/nginx/ssl/vw.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1.3 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:TLS13-AES-256-GCM-SHA384:T>    ssl_session_cache builtin:1000 shared:SSL:10m;
    # ssl_dhparam /etc/nginx/dhparam.pem;

    client_max_body_size 525M;

    location = / {
        if ($http_upgrade != "websocket") {
            return 403;
        }
    }

    location /vw/ {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;

      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $http_cf_connecting_ip;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;

      proxy_pass http://vaultwarden-default;
    }
 }

cacheci avatar Jun 07 '25 20:06 cacheci

Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.

github-actions[bot] avatar Jun 07 '25 20:06 github-actions[bot]