I have two domains, example1.com and example2.com, running on the same IP, 12.345.678.90.
Now I want to completely dissable https access via 12.345.678.90.
I tried to do this (compact code without fancy stuff)
<VirtualHost *:443>
SSLEngine off
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
ServerName example1.com
DocumentRoot /var/www/html/example1
SSLCertificateFile /etc/.../fullchain.pem
SSLCertificateKeyFile /etc/.../privkey.pem
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
ServerName example2.com
DocumentRoot /var/www/html/example2
SSLCertificateFile /etc/.../fullchain.pem
SSLCertificateKeyFile /etc/.../privkey.pem
</VirtualHost>
Now when I dissable the first block that catches all by default, the two example site work. However, if I enable it, nothing works anymore. Actually, this is just the port 80 solution copied for 443. It seems to be a SSL specific problem (encoded request data).
How can I block "IP access" over https? Or, what is the commonly used way to configure my setup?
Background is: It is not even standardized to create IP-based SSL-certificates, so it makes no sense to allow this kind of request.