I have two very similar Debian servers VMs, one with Debian 10 and one with Debian 12 (the problem one), with the default Apache installed from the official repo (current).
I need SNI checks enabled so I set it in
/etc/apache2/mods-enabled/ssl.conf
as
SSLStrictSNIVHostCheck On
I then tried to access the server via its IP, and it worked. At that moment, the SNI warning showed in the browser. I then turned it Off again to test other things and tried setting it On again, to no avail, because accessing the IP still shows me the vhost page instead of the 403 SNI denial of access.
The same exact changes, setting Off then On SSLStrictSNIVHostCheck on my Debian 10 VM and subsequent tests in the browser work perfectly, but I cannot get it to re-enable on my Debian 12 VM.
Troubleshooting has been done so far: I tested a virgin browser on another device to make sure it wasn’t cached locally and reloaded it with crtl+F5 on the main PC. Disabled mod_ssl, disabled the vhost, and re-enabled them. Rebooted the whole VM. Added a few commented lines in ssl.conf to register as a change.
Is there any caching mechanism in Apache that would prevent my config from being applied despite reload/restart? Is it a bug? I vaguely remember that same issue for some .htaccess files in the past, they would keep being enforced for a long while when I changed them.
Darkblue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.