You need to clear your cache. 
You can put the addresses in here to see the redirects work (without caching):
You need to clear your cache. 
You can put the addresses in here to see the redirects work (without caching):
Ah, I'm a moron. Didn't think of that for some reason, thanks. :P
It happens.

If you run into any further trouble, you know where to find us. I'm going to have this thread reviewed by the certbot developers. That should not have happened.
I know this thread is a bit long, but I feel like something went seriously awry with certbot creating the port 443 vHost AND copying over the port 80 vHost into the same conf file (thus overriding the real port 80 conf file containing the http to https redirect).
I spent a good hour playing with this and was unable to reproduce the problem.
I started with default Apache config files running Ubuntu 20.04 on DigitalOcean, made the changes that the original poster did to 000-default.conf, and ran Certbot. Certbot didn't crash, the certificates were successfully obtained, and redirects were added to the existing port 80 config file as expected.
The errors about RewriteEngine are particularly strange to me here because:
mod_rewrite is included in the apache2 package on Ubuntu.mod_rewrite to obtain certificates with the Apache but that succeeded unless a different Certbot plugin was used for authentication.After trying that, I made the changes griffin suggested in their post at CertBot unable to install certificate on fresh apache2 installation - #7 by griffin and also was unable to recreate a problem.
My best guess is that in the many attempts to obtain/install certificates recently (see crt.sh | 2darkpark.net) something got messed up. Either a configuration was created that Certbot didn't understand or the configuration was manually modified in an incorrect way.
@MxSelfDestruct, if you want to email the log files under /var/log/letsencrypt to bmw@eff.org, I'm happy to take a look, see if I can make sense of the problem, and get it fixed if it's a Certbot issue. With my own testing based on what I saw here though, I was unfortunately unable to recreate the problem. If anyone else is, please share how to do so and I'll gladly investigate.
Thanks for looking into this, @bmw. 
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.