I have a VPS that hosts several domains. I have set up Apache in the following manner:
<VirtualHost somedomain.com:80> ServerName somedomain.com ServerAlias www.somedomain.com ... </VirtualHost>
<VirtualHost someotherdomain.com:80> ServerName someotherdomain.com ServerAlias www.someotherdomain.com ... </VirtualHost>
Then I symlink the config files from
sites-enabled and all is well.
I had a need to 'turn off'
someotherdomain.com, so I removed the symlink to
sites-enabled and the site no longer shows up... BUT typing
someotherdomain.com into a web browser brings up
somedomain.com!!! I need it to not resolve at all.
Does somethiing need to be done in the VirtualHost to just automatically return a 500 or something along those lines. I really don't want people to reach one website from a different domain.
ports.conf looks like this
NameVirtualHost *:80 Listen 80 <IfModule mod_ssl.c> NameVirtualHost *:443 Listen 443 </IfModule> <IfModule mod_gnutls.c> Listen 443 </IfModule>