Let's encrypt, cloudflare and too many redirects

2017-12-24 18:44:57

While porting my web from Dreamhost to Google Cloud with Let's Encrypt had exactly 0.0 seconds of downtime, adding my magic-cloud-powered web site to Cloudflare was a major disaster, losing millions, billions of Saicoins in the proccess, with almost 24 hours of downtime.

The problem was that Let's Encrypt modifies the Apache configuration to convert every open connection to secure, but Cloudflare seems to do exactly the same, breaking the entire internet with a black hole of 301 redirecctions.

The solution is pretty simple, just disable the mod_rewrite configuration from Let's Encrypt (in my setup, it was in /etc/apache2/sites-enabled/000-default.conf ) and pray for Mojo: