Problem authenticating cert.. "Invalid response from" 404

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. crt.sh | 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: subdomain.example.com

I ran this command: acme.sh --issue -d subdomain.example.com -d www.subdomain.example.com --server letsencrypt -w /home/webaixaj/public_html

It produced this output:
[Thu Dec 19 10:19:16 EST 2024] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Thu Dec 19 10:19:17 EST 2024] Creating domain key
[Thu Dec 19 10:19:17 EST 2024] The domain key is here: /home/webaixaj/.acme.sh/subdomain.example.com_ecc/subdomain.example.com.key
[Thu Dec 19 10:19:17 EST 2024] Multi domain='DNS:subdomain.example.com,DNS:www.subdomain.example.com'
[Thu Dec 19 10:19:19 EST 2024] Getting webroot for domain='subdomain.example.com'
[Thu Dec 19 10:19:19 EST 2024] Getting webroot for domain='www.subdomain.example.com'
[Thu Dec 19 10:19:19 EST 2024] Verifying: subdomain.example.com
[Thu Dec 19 10:19:19 EST 2024] Pending. The CA is processing your order, please wait. (1/30)
[Thu Dec 19 10:19:23 EST 2024] subdomain.example.com: Invalid status. Verification error details: xxx.xxx.xxx.xxx: Invalid response from https://subdomain.example.com/.well-known/acme-challenge/-74mGZwl3pKOrfO4dlzqcWLJTVvSN-0UnL5dDJfBZF0: 404
[Thu Dec 19 10:19:23 EST 2024] Please add '--debug' or '--log' to see more information.
[Thu Dec 19 10:19:23 EST 2024] See: How to debug acme.sh · acmesh-official/acme.sh Wiki · GitHub

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

I'm using: NameCheap

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

Newbie to the SSL world and could use a bit of guidance and help...

I was able to successfully create a cert for my webroot example.com and would like to use a single certificate for everything but I'm struggling with a wildcard cert, which gives another error when trying to run:

[webaixaj@server145 ~]$ [webaixaj@server145 ~]$ .acme.sh/acme.sh --issue -d *.example.com --server letsencrypt -w /home/webaixaj/public_html --forcexaj
[Thu Dec 19 13:49:41 EST 2024] Unknown parameter: subdomain.example.com

So I just thought I would punt and create individual certs, I currently only have the 3 domains...

When executing the acme.sh there is no file being generated in /.well-known/acme-challenge/ so I'm not surprised that the verification is failing.

Appreciate any help.

Hello @vbtalent, welcome! :slight_smile:

This requires the the DNS-01 challenge of the Challenge Types - Let's Encrypt, yet this clearly indicates that the HTTP-01 challenge is being used earlier.

Double-check the -w folder you used is the one LiteSpeed uses for these domain names. I am guessing it is probably different than for your apex and its www subdomain you got earlier. The "404" means "Not Found". acme.sh placed the challenge token in the -w folder. But, when the Let's encrypt server asked for it your LiteSpeed said it couldn't find it.

Ideally you would not redirect the incoming HTTP challenge request to HTTPS. Just return the correct token when it arrives as HTTP. The redirect is supported just a bit extra complexity and time.

1 Like

I believe I understand your response, for the Wildcard it requires the use of the DNS-01 challenge.. I don't see the use of --dns as an argument in the command.

It's the 404 error that I'm trying to resolve at the moment, just stuck on my next steps to fix it.

Given your previous post, shouldn't the -w folder be for
(something)/ajmmame.webajm.com ?

1 Like

I see what you're saying... so yes.

Changing the command path worked...

-w /home/webaixaj/subdomain.example.com

I presume that the SSL cert will expire in 90 days, and therefore the CRONTAB job will perform a refresh prior to expiration, is there anything I need to do on my end or is it a seamless process?

I am not an acme.sh expert but, yes, I believe that should renew your cert after 60 days. In other words, with 30 days remaining before expiry. That is the default.

You can check which certs are renewed with .../acme.sh --list

1 Like

Can I ask a follow up question regarding the DNS-01 challenge... according to the challenge-types documentation, it says the following:

After Let’s Encrypt gives your ACME client a token, your client will create a TXT record derived from that token and your account key, and put that record at _acme-challenge.YOUR_DOMAIN. Then Let’s Encrypt will query the DNS system for that record.>

Are they referring to the following record that I do see in my DNS?

I do not see a record that has been created with a prefix of "_acme-challenge" so I'm trying to understand how that record is created and where to glean the information so that I could create it myself.

The second question to using DNS-01 challenge is will this record need to be updated when the keys change every 90 days?

Thanks,

No.

It typically is transitory, that is it is dynamically created then verified and then deleted. This preformed by the dns plugin that works with the DNS Provider’s API.
But yes it can be done manually, not a good solution for automation.

Yes, but typically every 60 days as certificate are presently intended to be renewed at two thirds of the certificate’s lifetime.

1 Like

No, not that record.

One of the DNS plugins for acme.sh will add and delete the TXT record as needed. Hopefully acme.sh has one that supports your DNS provider. It supports very many but I didn't lookup yours.

UPDATE: Oh, you have NameCheap as your DNS provider. You will need to verify with them if they support an API for updates with your type of account. I vaguely remember there are some restrictions with them.

Yes, a new TXT record value is needed for each new certificate request. This includes "renewal" requests which normally occur every 60 days.

1 Like

Thank you.

I believe I vaguely understand its working...

Does anyone know of a how to that might be floating around for setting up DNS-01 challenge using Cloudflare and NameCheap?

Maybe start here for NameCheap: dnsapi · acmesh-official/acme.sh Wiki · GitHub

And Cloudflare here: dnsapi · acmesh-official/acme.sh Wiki · GitHub

1 Like