We help IT Professionals succeed at work.
Get Started

Ubuntu Virtual host resolves to another domain's first alphabetical sub-domain instead of its own

512 Views
Last Modified: 2013-12-14
I have two domains on a rackspace cloud: Dice.com and Dive.com. The DNS for both point to one IP address. I have A records for both on rackspace that point to the same IP address. I have multiple virtual hosts running for Dice.com including beta.Dice.com, ads.Dice.com, and of course www.Dice.com. But when I navigate a browser to Dive.com I get the files for beta.mousedice.com

I have created a Dive.com virtual host and pointed it to the correct files. I have also enabled the Dive.com site via a2ensite Dive.com and restarted Apache.

Why am I able to see all of the DICE sites and only have the one DIVE site show the beta.Dice.com site?

Of course, I changed the domain names for privacy.
Thanks
Here is my Dive.com virtual host:

<VirtualHost *:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin webmaster@dive.com
  ServerName  dive.com
  ServerAlias www.dive.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html
  DocumentRoot /home/kent/public_html/dive.com/html
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory "/home/kent/public_html/dive.com/html/">
                Order Deny,Allow
                AllowOverride All
        </Directory>

  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/kent/public_html/dive.com/log/error.log
  CustomLog /home/kent/public_html/dive.com/log/access.log combined

</VirtualHost>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE