i get this error message when i try to install certificate for my nginx server.
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for krbserver.me
tls-sni-01 challenge for www.krbserver.me
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. www.krbserver.me (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Connection reset by peer, krbserver.me (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Connection reset by peer
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.krbserver.me
Type: connection
Detail: Connection reset by peer
Domain: krbserver.me
Type: connection
Detail: Connection reset by peer
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
I have checked my dns as it says, and everything is good - i have 2 a records, one for www.hostname and one for hostname - and everything is good. i can access the sites via both addresses, but i cant get this certbot to work
Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is:
I ran this command:
It produced this output:
My web server is (include version):
The operating system my web server runs on is (include version):
In this case normally users need to create an explicit mapping so that /.well-known/acme-challenge is served as static files from some directory path.
The TLS-SNI-01 method used by --nginx, as @ahaw021 mentioned, can't work from behind a reverse proxy. The HTTP-01 method used by --webroot can work but you need to be able to make externally-visible changes to the site to prove that you control it—and unless you want to reprogram one of the web apps to add some kind of API to update the content, the easiest thing would be to create a mapping so that /.well-known/acme-challenge on the site gets served from the static files in some directory.
Because --webroot tries to create /.well-known/acme-challenge inside the location that you give it, in this case you would probably also want to run
inside of that directory, because otherwise the webroot plugin will try to place the verification files in what amounts to /.well-known/acme-challenge/.well-known/acme-challenge instead of just /.well-known/acme-challenge.
Thank you! I finally got it to work. I swapped the domain over to a
similar, and remade my server from a backup point but I did get it to
work behind a reverse proxy - check https://Breindal.me for verification