Hello, everyone. First I installed Letsencrypt through sudo certbot certonly --apache, but afterwards got to know, that it is not for CDN (Cloudflare sites), so I deleted carefully certificates by this instruction and deleted certbot itself by this manual. Installed everything again with command “sudo certbot --authenticator webroot --installer apache” and got “Certbot failed to authenticate some domains (authenticator: webroot) Invalid response from 404”
I have 3 Virtualhost sites with site.com and www.site.com names, I pointed during installation. The sites ape placed to /var/www/site.com/public_html paths, that I point as a webroot directory (every path to it’s site).
My domain is: https://homeproxy.pro
I ran this command: sudo certbot certonly --webroot --agree-tos --email mail@gmail.com -w /var/www/site.pro/public_html/ -d site.pro -d www. site.pro -w /var/www/site.com/public_html/ -d site.com -d www.site.com -w /var/www/site.org/public_html/ -d site.org -d www.site.org
It produced this output: Certbot failed to authenticate some domains (authenticator: webroot) Invalid response from http://www.site.com/.well-known/acme-challenge/... 404
My web server is (include version): Apache/2.4.41
The operating system my web server runs on is (include version): Ubuntu 20.04.6 LTS
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): Certbot 2.7.0.
Sites directory public_html is missed somehow during challenge. It produces site.com/.well-known instead of site.com/public_html/.well-known, though it t is pointed in conditions. I tried to create .well-known/acme-challenge 755 folders in site.com directory (without public_html), also, changed domain .conf to DocumentRoot /var/www/site.com, but helplessly. Before certbot reinstall, there was “failed to authenticate” only, without 404.
Additional info:
- Sites configs are under <VirtualHost *:443>
- Cloudflare SSL Full (strict) mode is now off
- Apachectl configtest is OK
- Ports 80,443 in ufw are opened
- Both A-records on Cloudflare point to the correct hosting server IP
- .htaccesseS are temporary renamed