Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Domain without the 'www.' gives me the Apache 'It works!' page

I have included a copy of my virtual host file for apache below. (However I have hidden the ip address and domain name for now)

My problem is that the following work:

This one doesn't work: - instead of going to the document root listed below, it goes to the document root of the default site.

What could be causing this?

<VirtualHost [ipaddresshidden]:80>
DocumentRoot /home/www/
ErrorLog /home/www/
CustomLog /home/www/ combined
share|improve this question

marked as duplicate by Mark Henderson Sep 9 '11 at 5:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Just a tip, use one ServerAlias line with each additional domain separated by a space. – Warner May 22 '10 at 17:06

First, let's get the most obvious things out of the way.

  1. Did you restart apache after adding ?
  2. Have you tried this in a different browser? Sometimes browsers cache the default home page very aggressively.
  3. What is the ServerName in the default httpd.conf? Is there a conflict in servernames by any chance?
share|improve this answer

I had this problem too, and found my solution here.

Basically, after an upgrade, Apache put a symlink in /etc/apache2/sites-available. Deleting everything between and including <VirtualHost *:80> and <VirtualHost> got everything working for me again.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.