I have several sites on my server. For example: domain1.com and domain2.com. If user requests a not existing sub-domain (For example: a.domain2.com) he will be redirected to domain1.com. I want to show 404 page if this situation happens. For http traffic I use such config for vhost:
<VirtualHost _default_:80>
Redirect 404 /
ErrorDocument 404 "Page Not Found"
</VirtualHost>
I also have https versions of my sites. I have tried to do something like this:
<VirtualHost _default_:433>
Redirect 404 /
ErrorDocument 404 "Page Not Found"
</VirtualHost>
But my https sites stop opening. How to achive http behavior for https?