Below are the key lines from the log. In words, NPM is running Certbot to use an HTTP Challenge with --webroot
method. The --webroot-path
is /data/letsencrypt-acme-challenge
. Because of these settings Certbot creates a challenge token file in this folder:
/data/letsencrypt-acme-challenge/.well-known/acme-challenge
After making that challenge token, Certbot has the Let's Encrypt Server validate your domain. The LE Server issues an HTTP request to your openresty
(?) server looking for this challenge token file. This is failing with a 404 Not Found.
So, how to fix? I don't know. I am not an NPM expert so maybe try their forum if you can't fix it knowing this new info.
Key parts from your log (timestamps removed for readability)
2023-05-06 12:13:58,458:
DEBUG:certbot._internal.main:certbot version: 2.4.0
DEBUG:certbot._internal.main:Location of certbot entry point: /usr/bin/certbot
DEBUG:certbot._internal.main:Arguments: ['--config', '/etc/letsencrypt.ini', '--work-dir', '/tmp/letsencrypt-lib', '--logs-dir', '/tmp/letsencrypt-log', '--cert-name', 'npm-58', '--agree-tos', '--authenticator', 'webroot', '--email', '[redacted]', '--preferred-challenges', 'dns,http', '--domains', 'sr.1985.is']
DEBUG:certbot._internal.plugins.selection:Requested authenticator webroot and installer None
2023-05-06 12:13:59,682:
INFO:certbot._internal.auth_handler:http-01 challenge for sr.1985.is
INFO:certbot._internal.plugins.webroot:Using the webroot path /data/letsencrypt-acme-challenge for all unmatched domains.
DEBUG:certbot._internal.plugins.webroot:Creating root challenges validation dir at /data/letsencrypt-acme-challenge/.well-known/acme-challenge
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: sr.1985.is
Type: unauthorized
Detail: 157.97.24.197: Invalid response from http://sr.1985.is/.well-known/acme-challenge/869J7bJiMdV1i-IA1L912B_BbjIi2SuRtF5o2gMFMrw: 404
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded
Your domain responding to a test http challenge (note server response header)
The 404 is expected here since the file ForumTest1234 doesn't exist. I include this here because your "home page" is handled by an Apache server but openresty handles the HTTP challenge
curl -I files.1985.is/.well-known/acme-challenge/ForumTest1234
HTTP/1.1 404 Not Found
Server: openresty
Date: Sat, 06 May 2023 15:54:30 GMT
Your home page by Apache.
curl -I files.1985.is
HTTP/1.1 301 Moved Permanently
Date: Sat, 06 May 2023 15:42:30 GMT
Server: Apache
Location: https://files.1985.is/