GNettlefold GNettlefold - 3 years ago 233
Linux Question

How to create a Let’s Encrypt self signed certificate for a subdomain only? (error in post)

How to create a Let’s Encrypt self signed certificate for a subdomain?

To be specific:


  • sub.domain.com
    (needs a certificate and points to an ip address)

  • domain.com
    (does not point to anything)



When following the following instructions, I get the following errors:

>>> sudo -H ./letsencrypt-auto certonly --standalone -d sub.domain.com --register-unsafely-without-email
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for sub.domain.com
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. sub.domain.com (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout

IMPORTANT NOTES:
- The following errors were reported by the server:

Domain: sub.domain.com
Type: connection
Detail: Timeout

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.

Answer Source

You need to run the commands on the server, cause the command verifies you control the domain, so if it's not on the server it can't verify correctly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download