NodeJs + Cerbot error

Please fill out the fields below so we can help you better.

My domain is:

fitmysofa.com

I ran this command:

certbot certonly --webroot -w /var/www/html -d fitmysofa.com -d www.fitmysofa.com

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for fitmysofa.com
http-01 challenge for www.fitmysofa.com
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. www.fitmysofa.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: DNS problem: NXDOMAIN looking up A for www.fitmysofa.com

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: www.fitmysofa.com
    Type: connection
    Detail: DNS problem: NXDOMAIN looking up A for www.fitmysofa.com

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A 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.

My web server is (include version):

NodeJS 6.11

The operating system my web server runs on is (include version):

Debian GNU/Linux 8.8 (jessie)

My hosting provider, if applicable, is:

ramnode

I can login to a root shell on my machine (yes or no, or I don’t know):

yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

no only shell

Huh, just wrote

sudo certbot certonly --webroot -w /var/www/html -d fitmysofa.com

and it works!

Congratulations! Your certificate and chain have been saved

Sorryyyy

But still
Chorme indicates that the connection to the server is unsave :frowning:

damn ! looks like nothing worked as expected :frowning:

Please assist, its my first time :zipper_mouth_face:

That DNS failure did not allow you to get the "www" cert.
If you access the domain via the "www" name the existing cert will NOT match.
retry both FQDNs:

I have manged to go further,

this command generates KEY and CSR:
certbot certonly --webroot -w /var/www/html -d fitmysofa.com -d www.fitmysofa.com
after, I copied KEY and CSR to my project and specifid the KEY and CSR path in Angular-CLI

“defaults”: {
…,
“serve” : {
“sslKey”:“ssl/key.pem”,
“sslCert”:“ssl/csr/pem”
}
}
Also added to package.json
ng serve -ssl 1

after all this the wepage crashes …
it even dont load.

Thank you Sir for your reply.

A CSR is not a certificate. It is a "certificate signing request". They are not interchangeable at all. Most users should never use the CSR directly for anything.

Instead of using the CSR as if it were your certificate, you should use your actual certificate! You can probably find it at the location that Certbot told you in the "Congratulations!" message when you got the certificate (within /etc/letsencrypt/live).

1 Like

Yes, CSR and CER files are NOT interchangeable and are for completely different uses.

Is that a TYPO?
The first line has one slash and the second line has two slashes...

Omg, i mixed everything :blush:

back surfing the web …

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