I am having a slight apache problem. It’s probably something so minor that I am just over looking it. This is the scenario. I have an Ubuntu 10.04 server setup with 2 websites. Before all of this, I had one site and I accessed it via the IP address. I just added a second site, this one with a domain name, and I created a new file in the sites-available dir. with a link to the sites-enabled dir.
The first site (the one I accessed via IP) config looks something like this:
#Default
<VirtualHost *:80>
DocumentRoot /var/www
......etc
Then the other config is something like this:
#Secondary
<VirtualHost TheDomainName.com:80>
DocumentRoot /var/www/thedomainname
.......etc
If you guys need me to post the full config files I will. Why does the request for the IP address fall through to the DomainName config? Is it because they are identical IP addresses? How do I differentiate between the two?
If I try to set the ip address on the first “Default” config instead of “*”, this site only works and I can never get to the other “Secondary” site.
Thanks.
For site1:
For site2: