[Solved by itself] Well-known returns 404 for letsencrypt but it is OK for me

My domain is: noonlordhost.com

My web server is (include version): nginx

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

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): latest acme.sh v3.0.3

I can get the wellknown from browser, curl, wget just fine but acme.sh says that it returned 404. I copied and pasted the url in my browser and it returned the file. This is the URL: http://noonlordhost.com/.well-known/acme-challenge/EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ

Error log:

remote: [Thu May  5 14:51:40 UTC 2022] uri='https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ'
remote: [Thu May  5 14:51:40 UTC 2022] keyauthorization='EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ.sEj8KBAqZp6YMfR9bS3qQ9zFRURNgxUmyAS5BrxOb0A'
remote: [Thu May  5 14:51:40 UTC 2022] dvlist='noonlordhost.com#EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ.sEj8KBAqZp6YMfR9bS3qQ9zFRURNgxUmyAS5BrxOb0A#https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ#http-01#/home/piku/.piku/acme'
remote: [Thu May  5 14:51:40 UTC 2022] d
remote: [Thu May  5 14:51:40 UTC 2022] vlist='noonlordhost.com#EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ.sEj8KBAqZp6YMfR9bS3qQ9zFRURNgxUmyAS5BrxOb0A#https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ#http-01#/home/piku/.piku/acme,'
remote: [Thu May  5 14:51:41 UTC 2022] d='noonlordhost.com'
remote: [Thu May  5 14:51:41 UTC 2022] ok, let's start to verify
remote: [Thu May  5 14:51:41 UTC 2022] Verifying: noonlordhost.com
remote: [Thu May  5 14:51:41 UTC 2022] d='noonlordhost.com'
remote: [Thu May  5 14:51:41 UTC 2022] keyauthorization='EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ.sEj8KBAqZp6YMfR9bS3qQ9zFRURNgxUmyAS5BrxOb0A'
remote: [Thu May  5 14:51:41 UTC 2022] uri='https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ'
remote: [Thu May  5 14:51:41 UTC 2022] _currentRoot='/home/piku/.piku/acme'
remote: [Thu May  5 14:51:41 UTC 2022] wellknown_path='/home/piku/.piku/acme/.well-known/acme-challenge'
remote: [Thu May  5 14:51:41 UTC 2022] writing token:EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ to /home/piku/.piku/acme/.well-known/acme-challenge/EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ
remote: [Thu May  5 14:51:41 UTC 2022] Changing owner/group of .well-known to piku:www-data
remote: [Thu May  5 14:51:41 UTC 2022] url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ'
remote: [Thu May  5 14:51:41 UTC 2022] payload='{}'
remote: [Thu May  5 14:51:41 UTC 2022] POST
remote: [Thu May  5 14:51:41 UTC 2022] _post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ'
remote: [Thu May  5 14:51:41 UTC 2022] _CURL='curl --silent --dump-header /home/piku/.acme.sh/http.header  -L  -g '
remote: [Thu May  5 14:51:41 UTC 2022] _ret='0'
remote: [Thu May  5 14:51:41 UTC 2022] code='200'
remote: [Thu May  5 14:51:41 UTC 2022] trigger validation code: 200
remote: [Thu May  5 14:51:41 UTC 2022] Pending, The CA is processing your order, please just wait. (1/30)
remote: [Thu May  5 14:51:41 UTC 2022] sleep 2 secs to verify again
remote: [Thu May  5 14:51:43 UTC 2022] checking
remote: [Thu May  5 14:51:43 UTC 2022] url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ'
remote: [Thu May  5 14:51:43 UTC 2022] payload
remote: [Thu May  5 14:51:43 UTC 2022] POST
remote: [Thu May  5 14:51:43 UTC 2022] _post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/105401855766/yZJkyQ'
remote: [Thu May  5 14:51:43 UTC 2022] _CURL='curl --silent --dump-header /home/piku/.acme.sh/http.header  -L  -g '
remote: [Thu May  5 14:51:44 UTC 2022] _ret='0'
remote: [Thu May  5 14:51:44 UTC 2022] code='200'
remote: [Thu May  5 14:51:44 UTC 2022] noonlordhost.com:Verify error:130.61.19.44: Invalid response from http://noonlordhost.com/.well-known/acme-challenge/EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ: 404
remote: [Thu May  5 14:51:44 UTC 2022] Debug: get token url.
remote: [Thu May  5 14:51:44 UTC 2022] GET
remote: [Thu May  5 14:51:44 UTC 2022] url='http://noonlordhost.com/.well-known/acme-challenge/EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ'
remote: [Thu May  5 14:51:44 UTC 2022] timeout=1
remote: [Thu May  5 14:51:44 UTC 2022] _CURL='curl --silent --dump-header /home/piku/.acme.sh/http.header  -L  -g  --connect-timeout 1'
remote: <html>
remote: <head><title>404 Not Found</title></head>
remote: <body>
remote: <center><h1>404 Not Found</h1></center>
remote: <hr><center>nginx/1.18.0 (Ubuntu)</center>
remote: </body>
remote: </html>
remote: [Thu May  5 14:51:44 UTC 2022] ret='0'
remote: [Thu May  5 14:51:44 UTC 2022] Debugging, skip removing: /home/piku/.piku/acme/.well-known/acme-challenge/EssidhLBQ5ZwnvTEITflvZr-KDlas2CZNp31XkaMIWQ```

Show us the nginx config.

2 Likes

Thanks for responding! It somehow works for whatever reason now.

3 Likes