I have a Web Server using certbot to issue certificates. When I issue certificates for a domain, cerbot changes the apache config files (original file + mydomain-le-ssl.conf) of my domain to use only https.

For one of my domains, I have lots of content that use non-https (YouTube videos, images, etc). So for now I want to rollback to the original config where it used non-https.

I tried to remove manually the generated apache config by certbot, but it caused the domain to show as untrusted in chrome where you have click advanced and click yes, I really want to go to this page anyways.

How do I go back to a simple non-https domain?

I've looked-up google, but I am not sure if I need to revoke the certificate, or just remove the config or else.

  • You don't need to revoke the certificate. At most you need to restore you old Apache configuration. Do you have a backup? Did you make lots of config changes since Apache was installed? How did you install Apache? – Stephen Ostermiller Jul 4 '17 at 9:22
  • "...cerbot changes the apache config files..." It does not. Only you control that. – Rob Jul 4 '17 at 12:21
  • No it does change it. When it asks if you want secure only or both and chose secure only, it adds to the config file: RewriteEngine on RewriteCond %{SERVER_NAME} =www.mydomain.com [OR] RewriteCond %{SERVER_NAME} =mydomain.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] – Lunfel Jul 5 '17 at 2:43
  • No, I don't have it. I might copy another non-https config then and start from there. – Lunfel Jul 5 '17 at 2:44

It ended up it was a browser caching issue. Found out using incognito mode.

So, what I did is I commented out those config lines generated by certbot in my original Apache config file:

#RewriteEngine on
#RewriteCond %{SERVER_NAME} =www.mydomain.com [OR]
#RewriteCond %{SERVER_NAME} =mydomain.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

And then I did,

sudo a2dissite mydomain.prod-le-ssl.conf
sudo service apache2 reload

Then, went to see if my page was ok. It was telling me that the certificate was not from the right origin. It was actually trying to pull the certificate from another of my domains for some reason.

I went to clear browsing data in chrome settings and clear only cached images and files. Then I reloaded the page and it was fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.