I was able to successfully use letsencrypt to setup SSL on one of my domains. However, I tried adding a second domain hosted on the same server but I get a browser error “ERR_TOO_MANY_REDIRECTS” when trying to load the https version of the site.
My server is on DO, Ubuntu 14.04/apache 2.4.7.
I can’t for the life of me figure out why https://www.seconddomain.com (for example) has redirect errors. The HTTP version works perfectly fine so I believe I have the virtual hosts files setup correctly.
Is there a redirect to https inside <VirtualHost *:443>? That’s what the letsencrypt client did by default for me. Obviously https should not redirect to https.
EDIT: Thinking about it now. I realize what it did. I copied the firstdomain.com.conf to seconddomain.com.conf AFTER I setup the firstdomain’s cert…which had the http -> https redirect in it. So when I setup seconddomain’s cert…it copied the redirect lines over to the ssl conf file causing the infinite loop.
If you post what you have, it will be easier to tell you what's wrong
The last time I had redirect issues, it was because I'd forgotten a "/" at the end of a line. While the site seemed to work just fine, it caused certbot to fail with an unhelpful message. There are so many subtle things that can go wrong, we'd need to see what you've done first!
This comment about Cloudflare saved me as well. As soon as I changed that setting, everything was a green light. Can anyone elaborate on why this is happening, just for better understanding?