I hope that title is clear.

How do I prevent HTTPS requests for non-ssl-enabled virtual hosts from going to the first ssl-enabled virtualhost (setup is Apache-SNI).

For example, using my abbreviated config below, requests for https://example.com (a non-ssl vhost) are being served by Apache at the ssl-enabled vhost https://example.org. I'd like to disable that behavior and possibly reply with the appropriate HTTP response code (unsure of what that is).

It may not even be possible, but I thought I'd ask.

# I actually have a SNI setup, but it's not demonstrated here.
# I don't think it's relevant in this situation.

NameVirtualHost *:80
NameVirtualHost *:443

&lt;VirtualHost *:80&gt;
    ServerName example.org
&lt;/VirtualHost&gt;

&lt;VirtualHost *:443&gt;
    ServerName example.org
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
    ServerName example.com
&lt;/VirtualHost&gt;


EDIT: Maybe a mod_rewrite rule in the first ssl-vhost?


Question: What does Arch Linux offer?
Answer: I have been running Slackware releases for some years.  I made my development machine into an Arch box a couple of years ago. I think that Arch holds your hand a bit more than Slackware, in that pacman can detect missing packages, where installpkg doesn't.  To me, it also seemed easier to have a custom kernel on Slackware than on Arch: I gave up on custom kernels and just went with the Arch rolling release kernel.

I don't think Arch takes that much extra time, I would gladly have an Arch desktop (as long as I get to run pacman -Syu once a week), and I would gladly spend 100% of my time in Arch or Slackware.  But my tastes in user interface differ wildly from The Norm, and I do like to have total control over compilers, configurations, etc.