I’ll write in english for this article since it’s technical and may be very usefull for many people.
So I had this error for days on all my apache ssl virtualhosts. I guess it came from the last dist-upgrade I’ve made. I’ve googled for hours without finding any working solution. Everything was working well before and I’ve made no related changes.
Listen 443 was set in ports.conf, I removed the « if » statement to be sure, as in mods-enabled/ssl.conf. I checked that I’ve had no virtualhost without port 80 or 443 defined. I’ve checked that there’s no default virtual host with *.
I also tried to add my ip in Listen statement and « https » at the end.
SSLEngine was set to « On », SSLCertificateFile .cert file was defined and ok, so as SSLCertificateKeyFile (I was pretty sure since everything was ok before).
Finally, I’ve disabled all my ssl vhosts, just keeping the one I wanted for the moment, and it worked. After enabling the others one by one, I found the bad one : in one vhost, instead of doing :
<VirtualHost ip:80>
ServerName domain.tld
ServerAlias domain.tld
redirect / https://domain.tld
</VirtualHost>
I was doing the opposite (I guess I didn’t want any SSL on this site) :
<VirtualHost ip:443>
ServerName domain.tld
ServerAlias domain.tld
redirect / http://domain.tld
</VirtualHost>
I don’t know why, but after removing this part, everything was back to normal. It was not really important for me, but if you have any explaination, I’ll be glad to hear it.
I hope this could help someone
EDIT : adding
SSLEngine On
SSLCertificateFile /path/to.cert
SSLCertificateKeyFile /path/to.key
in my ssl vhost redirecting to non-ssl vhost solved the problem too (it seems logical, but it was working without before).