Apache disabled virtual host domains resolve an enabled virtual host
- by littleK
I have three virtual hosts defined on apache on my Ubuntu server for three different domains. If I disable two of the virtual hosts (a2dissite) and try to resolve those two URL's in the browser, then the one remaining enabled site will resolve.
How can I configure apache so that the domains for the disabled virtual hosts do not resolve?
This is how all 3 virtual hosts are configured (info is masked):
# domain: myfirstdomain.com
# public: /home/me/public/myfirstdomain.com/
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin [email protected]
ServerName www.myfirstdomain.com
ServerAlias myfirstdomain.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /home/me/public/myfirstdomain.com/public
# Log file locations
LogLevel warn
ErrorLog /home/me/public/myfirstdomain.com/log/error.log
CustomLog /home/me/public/myfirstdomain.com/log/access.log combined
</VirtualHost>