I really messed up one of my sites and my skill level is not high enough to figure this out, i don't understand enough about rewrite rules but i think that must be the cause.
My domain is: zaviera.nl
My web server is (include version): Apache/2.4.7 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 14.04.2 LTS
My hosting provider is: this is a VPS
I can login to a root shell on my machine: Yes
I'm using a control panel to manage my site: No
I ran this command: ./certbot-auto renew --dry-run
It produced this output:
First i kep struggling with errors like> timeout authentication failure, could not connect to the client to verify the domain.
From other threads i gathered this could be a firewall issue but then why are my other sites working normally from the same server? Also i could just ping my site without problems and als do a telnet command to port 80.
But suddenly it worked even though chrome still give me an insecure message so it seems the certificate install failed?
Please take a look here: https://zaviera.nl/administratie
The weird thing is that i have different other sites on this same VPS which are running fine and also have a Letsencrypt certificate. Example: opendial.nl
Now the help i would very much appreciate:
1.How do i remove the faulty certificate and reinstall it? In the past i always did:
./certbot-auto --apache
chose the site and then chose option 2 (secure redirect all to HTTPS)
then i would do
./certbot-auto certonly --webroot -w /var/www/zaviera.nl/public_html/ -d www.zaviera.nl -d zaviera.nl
(otherwise google web console would complain that the certificate would only match for the domain without www)
2.How do i fix the Too many redirects error? What i already did was delete my vhosts here:
/etc/apache2/sites-available
specifically:
zaviera.nl.conf
zaviera.nl-le-ssl.conf
After that i let Certbot re-create zaviera.nl-le-ssl.conf automatically.
The contents of these files show these rules:
zaviera.nl.conf:
RewriteEngine on
RewriteCond %{SERVER_NAME} =zaviera.nl [OR]
RewriteCond %{SERVER_NAME} =www.zaviera.nl
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]