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. https://crt.sh/?q=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: prod.kuimba.info
I ran this command:
It produced this output:
My web server is (include version): nginx/1.10.3 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 16.04
My hosting provider, if applicable, is: AWS
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
I am using certbot to get certificate for my site. My site is using Cloudflare with SSL setting is Full (strict) and I am using universal certificate. I have this option on Cloudflare “Always use HTTPS” turn ON (which basically means it will redirect all HTTP traffic to HTTPS). I’ve use this command "sudo certbot certonly --rsa-key-size 2048 --nginx -d <domain_name> --agree-tos --email " to obtain let’s encrypt cert. However, this only works with “Always use HTTPS” turn OFF. Furthermore, if I have managed to obtain a certificate (by turning “Always use HTTPS” OFF), I can use the same command to renew the certificate and this work perfectly with “Always use HTTPS” turn on.
So here are my questions:
Obtaining a certificate fails when “Always use HTTPS” turn ON. I think this is because nginx plugin using http-01, and let’s encrypt server communicate with my site using HTTP, but all traffic are being redirect to HTTPS by Cloudflare and let’s encrypt server cannot handler that. Am I correct? And can you guys elaborate?
I am not really understand why renewing a certificate works fine with “Always use HTTPS” turn on. Can you help me to explain it? And can I renew an expired certificate with this setting?
Thanks in advance.
Edit: Here is my output when “Always use HTTPS” turn ON:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for prod.kuimba.info
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. prod.kuimba.info (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://prod.kuimba.info/.well-known/acme-challenge/tBCMXgjCVgZSjDI17w_pYP2z5Ogvx0s_zHbaZCtluYY: "<!DOCTYPE html>
<!–[if lt IE 7]> <html class=“no-js ie6 oldie” lang=“en-US”> <![endif]–>
<!–[if IE 7]> <html class="no-js "
- The following errors were reported by the server:
Detail: Invalid response from
<!–[if lt IE 7]> <html class=“no-js ie6 oldie” lang=“en-US”>
<!–[if IE 7]> <html class="no-js "
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.
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
Here is my output when “Always use HTTPS” turn OFF:
- Congratulations! Your certificate and chain have been saved at:
Your key file has been saved at:
Your cert will expire on 2018-11-11. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew all of your certificates, run