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):
Apache/2.4.29 (Ubuntu)
Ubuntu 18.04LTS
I can login to a root shell on my machine
certbot 1.7.0
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
VirtualHost configuration:
*:80 oakcloud.se (/etc/apache2/sites-enabled/vhosts.conf:4)
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: 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
I’m enforcing HTTPS on everything but /.well-known/acme-challenge/*
Hence why the access denied. I suppose there’s something else I’m missing in the setup of CloudFlare.
Removed HTTPS-rewrite, handle it by page rules after the well-known page rule.
Allowing HTTP-traffic in the firewalls leading to http://oakcloud.se/.well-known/acme-challenge/hej actually working.
Same response:
sudo certbot certonly --webroot -w /var/www/oakcloud.se/current/public -d oakcloud.se
Is there something else I’m missing?
Been at it for a week without progress. I have the exact same setup as 2 other domains (almost, missing something).
There’s a pretty straightforward way to prove that it’s the WAF’s fault.
In your access log, you should see 4 requests to /.well-known/acme-challenge/xxxxxxxxxxxxxxxx every time you try to issue the certificates using Certbot.
If you don’t see four requests (from user-agent Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)), it means they’re being blocked by Cloudflare.
That’s bizarre. For the record, I was the one who generated that certificate request with the challenge token HJ3F5UzvJzlOAfYwKoXGClXWi_XuQY_snkyhJuxf_tI.
The validation file is visible. But later there is a Cloudflare 403:
Forbidden
Visible Content: Please enable cookies. Error 1020 Ray ID: 5cefa931ccd1971e • 2020-09-07 10:14:06 UTC Access denied What happened? This website is using a security service to protect itself from online attacks. Cloudflare Ray ID: 5cefa931ccd1971e • Your IP : 85.215.2.227 • Performance & security by Cloudflare
Info: Html-Content with meta and/or script, may be a problem creating a Letsencrypt certificate using http-01 validation