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. https://crt.sh/?q=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:
zhangxiaopan.net
www.zhangxiaopan.net
I ran this command:
sudo certbot --apache -d zhangxiaopan.net -d www.zhangxiaopan.net
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.zhangxiaopan.net
http-01 challenge for zhangxiaopan.net
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. zhangxiaopan.net (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://zhangxiaopan.net/.well-known/acme-challenge/wD4OrUZoXpK10UKC_DtLm5l1ayHv7QdVn7pOk3Jhpqk [35.226.195.156]: “\n\n404 Not Found\n\n
Not Found
\n<p”, www.zhangxiaopan.net (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.zhangxiaopan.net/.well-known/acme-challenge/YQiD25FsjUa2Fa84hyOjgRpdBfIADkNn2D5rMbsTvxg [35.226.195.156]: “\n\n404 Not Found\n\nNot Found
\n<p”IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: zhangxiaopan.net
Type: unauthorized
Detail: Invalid response from
http://zhangxiaopan.net/.well-known/acme-challenge/wD4OrUZoXpK10UKC_DtLm5l1ayHv7QdVn7pOk3Jhpqk
[35.226.195.156]: “\n\n404 Not
Found\n\nNot Found
\n<p”Domain: www.zhangxiaopan.net
Type: unauthorized
Detail: Invalid response from
http://www.zhangxiaopan.net/.well-known/acme-challenge/YQiD25FsjUa2Fa84hyOjgRpdBfIADkNn2D5rMbsTvxg
[35.226.195.156]: “\n\n404 Not
Found\n\nNot Found
\n<p”To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version):
root@wordpress-vm-4:/var/www/html# /usr/sbin/apache2 -v
Server version: Apache/2.4.38 (Debian)
Server built: 2019-10-15T19:53:42
The operating system my web server runs on is (include version):
Debian 10
root@wordpress-vm-4:/var/www/html# uname -a
Linux wordpress-vm-4 4.19.0-9-cloud-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
My hosting provider, if applicable, is:
N/A, I built everything on top of Google Compute Engine (VM)
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):
N/A
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you’re using Certbot):
root@wordpress-vm-4:/var/www/html# certbot --version
certbot 0.31.0
===== Additional Information
Here is the log in /var/log/letsencry/letsencrypt.log
"addressesResolved": [
"35.226.195.156"
],
"addressUsed": "35.226.195.156"
}
]
}
]
}
2020-06-28 05:01:03,350:DEBUG:acme.client:Storing nonce: 0101WNGuRrzUZsN_E9W5CImVe0lrHBs5Wnj_5bptHTJLf0o
2020-06-28 05:01:03,350:DEBUG:certbot.reporter:Reporting to user: The following errors were reported by the server:
Domain: zhangxiaopan.net
Type: unauthorized
Detail: Invalid response from http://zhangxiaopan.net/.well-known/acme-challenge/wD4OrUZoXpK10UKC_DtLm5l1ayHv7QdVn7pOk3Jhpqk [35.226.195.156]: “\n\n404 Not Found\n\n
Not Found
\n<p”Domain: www.zhangxiaopan.net
Type: unauthorized
Detail: Invalid response from http://www.zhangxiaopan.net/.well-known/acme-challenge/YQiD25FsjUa2Fa84hyOjgRpdBfIADkNn2D5rMbsTvxg [35.226.195.156]: “\n\n404 Not Found\n\n
Not Found
\n<p”To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address.
2020-06-28 05:01:03,361:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 82, in handle_authorizations
self._respond(aauthzrs, resp, best_effort)
File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 168, in _respond
self._poll_challenges(aauthzrs, chall_update, best_effort)
File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 239, in _poll_challenges
raise errors.FailedChallenges(all_failed_achalls)
certbot.errors.FailedChallenges: Failed authorization procedure. zhangxiaopan.net (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://zhangxiaopan.net/.well-known/acme-challenge/wD4OrUZoXpK10UKC_DtLm5l1ayHv7QdVn7pOk3Jhpqk [35.226.195.156]: “\n\n404 Not Found\n\n
Not Found
\n<p”, www.zhangxiaopan.net (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.zhangxiaopan.net/.well-known/acme-challenge/YQiD25FsjUa2Fa84hyOjgRpdBfIADkNn2D5rMbsTvxg [35.226.195.156]: “\n\n404 Not Found\n\nNot Found
\n<p”2020-06-28 05:01:03,361:DEBUG:certbot.error_handler:Calling registered functions
2020-06-28 05:01:03,361:INFO:certbot.auth_handler:Cleaning up challenges
2020-06-28 05:01:03,530:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File “/usr/bin/certbot”, line 11, in
load_entry_point(‘certbot==0.31.0’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 1365, in main
return config.func(config, plugins)
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 1119, in run
certname, lineage)
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 121, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File “/usr/lib/python3/dist-packages/certbot/client.py”, line 410, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File “/usr/lib/python3/dist-packages/certbot/client.py”, line 353, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File “/usr/lib/python3/dist-packages/certbot/client.py”, line 389, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 82, in handle_authorizations
self._respond(aauthzrs, resp, best_effort)
File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 168, in _respond
self._poll_challenges(aauthzrs, chall_update, best_effort)
File “/usr/lib/python3/dist-packages/certbot/auth_handler.py”, line 239, in _poll_challenges
raise errors.FailedChallenges(all_failed_achalls)
certbot.errors.FailedChallenges: Failed authorization procedure. zhangxiaopan.net (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://zhangxiaopan.net/.well-known/acme-challenge/wD4OrUZoXpK10UKC_DtLm5l1ayHv7QdVn7pOk3Jhpqk [35.226.195.156]: “\n\n404 Not Found\n\n
Not Found
\n<p”, www.zhangxiaopan.net (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.zhangxiaopan.net/.well-known/acme-challenge/YQiD25FsjUa2Fa84hyOjgRpdBfIADkNn2D5rMbsTvxg [35.226.195.156]: “\n\n404 Not Found\n\nNot Found
\n<p”root@wordpress-vm-4:/var/log/letsencrypt#
Here is the Apache config
hangxiaopan@wordpress-vm-4:/var/www/html$ sudo apache2ctl -S
VirtualHost configuration:
*:443 zhangxiaopan.net (/etc/apache2/sites-enabled/zhangxiaopan.net.conf:1)
*:80 zhangxiaopan.net (/etc/apache2/sites-enabled/zhangxiaopan.net.conf:1)
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=“www-data” id=33
Group: name=“www-data” id=33
=== Virtual Host Config
<VirtualHost *:80 *:443>
ServerAdmin admin@your_email_domain
ServerName zhangxiaopan.net
ServerAlias www.zhangxiaopan.net
DocumentRoot /var/www/zhangxiaopan.net
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteOptions InheritDownBefore
RewriteRule "^/.well-known/acme-challenge/" - [END]
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
I had suspected it is .htaccess config because I see ‘certbot’ tried to enable some rewrite engine which my apache did not have by default (later I enabled those the rewrite module manually but it still failed), so I searched the internet to tried some random advice (like https://blog.rimuhosting.com/2018/11/29/solve-letsencrypt-including-certbot-problems-caused-by-rogue-htaccess-files/), but got no lucky.
Could somebody please help?