I realize this is a common question and I am sorry that despite reading a ton of related threads, I am still unable to resolve my problem.
They used to renew when I was on Ubuntu 16.04, but after upgrading to 18.04 failed, I was forced to reformat the disk and redo everything from scratch.
Currently using WordPress 4.9.8 on my sites.
OS: Ubuntu 18.04.1 with latest updates as of 08:00 GMT 11-Dec-2018
certbot: 0.26.1
apache2: 2.4.29
I am (fairly) certain certbot renew --dry-run worked back in September 2018.
I use Cloudflare. I verified that the SSL option is set to âFull SSL (strict)â
The âauthenticatorâ is set to âapacheâ in my /renewal/conf file
I did not have an âacme-challengeâ directory, so I created one. I set the ownership to âwww-data:www-dataâ and the permissions to 777 (not happy about that).
I added the file âgoodbyeâ to the folder to ensure it could be accessed.
I also added a â.htaccessâ to turn the âRewriteEngineâ off in that folder.
Around 08:00 GMT 11-Dec-2018, I also added an âAAAAâ record to point to my ip6 address.
Executing: certbot renew --dry-run results in:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Processing /etc/letsencrypt/renewal/complete-concrete-concise.com.conf
Cert is due for renewal, auto-renewingâŚ
Plugins selected: Authenticator apache, Installer apache
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for faqbite.com
http-01 challenge for www.faqbite.com
http-01 challenge for complete-concrete-concise.com
http-01 challenge for www.complete-concrete-concise.com
Waiting for verificationâŚ
Cleaning up challenges
Attempting to renew cert (complete-concrete-concise.com) from /etc/letsencrypt/renewal/complete-concrete-concise.com.conf produced an unexpected error: Failed authorization procedure. www.complete-concrete-concise.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.complete-concrete-concise.com/.well-known/acme-challenge/Q9KlKi5_np590W-eBQozBw93v-W8rvKMqnotVrQYzOU: â\n\n404 Not Found\n<script src=â/cdn-cgi/apps/head/vDH", complete-concrete-concise.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://complete-concrete-concise.com/.well-known/acme-challenge /rp0A8itFOH9Wamakm8Z_kWXkb0gv9010VNjLBWQ4vG4: â\n\n404 Not Found\n<script src=â/cdn-cgi/apps/head/vDH". Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/complete-concrete-concise.com/fullchain.pem (failure)
** DRY RUN: simulating âcertbot renewâ close to cert expiry
** (The test certificates below have not been saved.)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/complete-concrete-concise.com/fullchain.pem (failure)
** DRY RUN: simulating âcertbot renewâ close to cert expiry
** (The test certificates above have not been saved.)
1 renew failure(s), 0 parse failure(s)
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: www.complete-concrete-concise.com
Type: unauthorized
Detail: Invalid response from
http://www.complete-concrete-concise.com/.well-known/acme-challenge/Q9KlKi5_np590W-eBQozBw93v-W8rvKMqnotVrQYzOU:
â\n\n404 Not Found\n<script
src=â/cdn-cgi/apps/head/vDH"Domain: complete-concrete-concise.com
Type: unauthorized
Detail: Invalid response from
http://complete-concrete-concise.com/.well-known/acme-challenge/rp0A8itFOH9Wamakm8Z_kWXkb0gv9010VNjLBWQ4vG4:
â\n\n404 Not Found\n<script
src=â/cdn-cgi/apps/head/vDH"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 apache config file for the site is:
# The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost
ServerName complete-concrete-concise.com
ServerAlias www.complete-concrete-concise.com
DocumentRoot /var/www/complete-concrete-concise.com/public_html
#DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
RewriteEngine on
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/complete-concrete-concise.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/complete-concrete-concise.com/privkey.pem