Acme.sh not generating .well-known/acme-challenge/ files

My domain is: starsandstrife.com

I ran this command: acme.sh --issue --webroot /var/www/.well-known/acme-challenge/ -d starsandstrife.com -d www.starsandstrife.com

It produced this output: starsandstrife.com:Verify error:The key authorization file from the server did not match this challenge Please check log file for more details: /root/.acme.sh/acme.sh.log

My web server is (include version): NodeJS

The operating system my web server runs on is: CentOS Linux release 7.9.2009 (Core)

My hosting provider, if applicable, is: InmotionHosting

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

The version of my client is: acme.sh v2.8.8

I recently moved the domain to a new server hosted on Node JS.
On the old server the domain's certificate was attached to a number of domains.
Now it is independent, so...

#1 -- Do I have to do anything to separate this domain? Revoke? Or Issue?
#2 -- The following command does not seem to create the necessary .well-known/acme-challenge files anywhere on the new server:

acme.sh --issue --webroot /var/www/.well-known/acme-challenge/ -d starsandstrife.com -d www.starsandstrife.com

What am I doing wrong?

1 Like

Hello @ovunque,

Your webroot isn't /var/www/.well-known/acme-challenge/ but /var/www/, you don't need to specify the subdirs .well-known/acme-challenge, acme.sh will create them.

acme.sh --issue --webroot /var/www/ -d starsandstrife.com -d www.starsandstrife.com

Edit: I forgot to say that maybe you want to include the parameter --reloadcmd "here the command or commands to reload your node.js server" so once your certificate is renewed your server will load it.

Cheers,
sahsanu

5 Likes

I should have known better. Your answer fixed it. Thank you!! Thanks for the extra tip as well.

3 Likes

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