Unable to generate certificate on Apache

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. crt.sh | 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: http://www.erccis-warehouse.org.uk/

I ran this command: sudo certbot certonly --apache --dry-run -v

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?

1: www.erccis-warehouse.org.uk

Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Simulating a certificate request for www.erccis-warehouse.org.uk
Performing the following challenges:
http-01 challenge for www.erccis-warehouse.org.uk
Waiting for verification...
Challenge failed for domain www.erccis-warehouse.org.uk
http-01 challenge for www.erccis-warehouse.org.uk

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: www.erccis-warehouse.org.uk
Type: unauthorized
Detail: Invalid response from http://www.erccis-warehouse.org.uk/.well-known/acme-challenge/oNNyHI9U4FSoLNrnNj1erzkqj3G56DnE6Ma_uhKTK2M [2a07:7800::138]: " <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv=""

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

Cleaning up challenges
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version): Apache 2.4.41

The operating system my web server runs on is (include version): Ubuntu 20.04.2 LTS

My hosting provider, if applicable, is: Eco Web Hosting -https://www.ecowebhosting.co.uk/.

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 1.16.0

1 Like

Your site has an IPv6 address configured which is responding in a whole different way compared to the IPv4 address configured. Let's Encrypt prefers IPv6.

Could it be the IPv6 addres is not actually the address of your server?


The domain resolves to both IPv4 and IPv6 addresses.
They don't both work:

curl -4Iki http://www.erccis-warehouse.org.uk/
HTTP/1.1 302 Found
Date: Fri, 11 Jun 2021 16:13:53 GMT
Server: Apache/2.4.41 (Ubuntu)
Set-Cookie: kohanasession=2tcv09m0ckqrmap8apvdr4eb1q; expires=Fri, 11-Jun-2021 18:13:53 GMT; Max-Age=7200; path=/
Set-Cookie: kohanasession=2tcv09m0ckqrmap8apvdr4eb1q; expires=Fri, 11-Jun-2021 18:13:53 GMT; Max-Age=7200; path=/
Set-Cookie: kohanasession_data=c2Vzc2lvbl9pZHxzOjI2OiIydGN2MDltMGNrcXJtYXA4YXB2ZHI0ZWIxcSI7dG90YWxfaGl0c3xpOjE7X2tmX2ZsYXNoX3xhOjA6e311c2VyX2FnZW50fHM6MTE6ImN1cmwvNy41OC4wIjtpcF9hZGRyZXNzfHM6MTE6Ijc1LjUxLjAuMTU0IjtsYXN0X2FjdGl2aXR5fGk6MTYyMzQyODAzMztyZXF1ZXN0ZWRfcGFnZXxzOjQ6ImhvbWUiOw%3D%3D; expires=Fri, 11-Jun-2021 18:13:53 GMT; Max-Age=7200; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: http://www.erccis-warehouse.org.uk/index.php/login
Content-Type: text/html; charset=UTF-8

curl -6Iki http://www.erccis-warehouse.org.uk/
curl: (56) Recv failure: Connection reset by peer

The IPv6 address fails and LE prefers IPv6 when present.

1 Like

IPv6 works for me, I'm getting a tiny HTML placeholder with <title>This domain is brand new</title>. IPv4 returns, through the same 302 header you're getting, a login screen.

1 Like

Thanks for the replies. This is a new domain and I suspect the AAAA records have not been set up for IPv6. I'll try and get that sorted before trying again.


Reporting back for the benefit of anyone who comes across this topic. The web hosts who'd set up the domain DNS had created AAAA records, but filled them in correctly. The dry run works now I've corrected that.

Thanks again.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.