I'm having the same issue and couldn't post there as the topic is closed.
My domain is: cp.cloudservers.we.bs
I ran this command: sudo certbot --apache --email myemail@email -d cp.cloudservers.we.bs --agree-tos --redirect --noninteractive
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 cp.cloudservers.we.bs
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. cp.cloudservers.we.bs (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://cp.cloudservers.we.bs/.well-known/acme-challenge/yC-5I_yMjpfvQFKYOHs2niMsW0dvpbkD-9m7ssQPeIo [2604:a880:400:d0::1a9d:3001]: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx/1.18.0</ce"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: cp.cloudservers.we.bs
Type: unauthorized
Detail: Invalid response from
http://cp.cloudservers.we.bs/.well-known/acme-challenge/yC-5I_yMjpfvQFKYOHs2niMsW0dvpbkD-9m7ssQPeIo
[2604:a880:400:d0::1a9d:3001]: "<html>\r\n<head><title>404 Not
Found</title></head>\r\n<body>\r\n<center><h1>404 Not
Found</h1></center>\r\n<hr><center>nginx/1.18.0</ce"
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): Debian GNU/Linux 9 (stretch)
I can login to a root shell on my machine (yes)
:
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 0.28.0
The domain is correctly pointing to the IP with A record but still why it gives that error?
I ran this command apachectl -S
Here's the output:
VirtualHost configuration:
127.0.0.1:81 app.cloudservers.we.bs (/etc/apache2/fastpanel2-sites/fastuser/app.cloudservers.we.bs.conf:7)
*:80 cp.cloudservers.we.bs (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex fcgid-proctbl: using_defaults
Mutex proxy: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_GITWEB
Define: ENABLE_USR_LIB_CGI_BIN
User: name="www-data" id=33
Group: name="www-data" id=33
I did run the site on https://check-your-website.server-daten.de/?q=cp.cloudservers.we.bs
What's the issue here and how could I fix this?