Nginx:latest well-known/acme-challenge Connection refused

nginx:1.17 works fine, but all versions above don't want it and give an error. It seems that the server does not work correctly, and does not work consistently
on domain/.well-known/acme-challenge/bzZal6pfklWX4kaQTb2x8s6PEI1MqFeN06ZtXA9_Dvs: Connection refused.

server {
    listen 80;
    server_name domain.com www.domain.com;

    location /.well-known/acme-challenge {
        allow all;
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name domain.com www.domain.com;
    server_tokens off;

    ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        root /usr/share/nginx/html;
        index index.html;
    }
}

First, is domain.com your actual domain name? Because that is a valid domain. It is difficult to help without knowing your real domain and you should have been given a form when posting asking for this. In any case, please do not use names that do not belong to you.

As for your problem, that sounds like a config problem with nginx or your comms setup. The sample nginx config you show has ssl certs. Do you have valid certs at that folder location?

Can you show the result of this

sudo nginx -t 

(lowercase t is fine for right now)

3 Likes

I don't see how an nginx upgrade can suddenly create that kind of a problem.
I also don't see how this would be the forum to discuss such a problem.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.