0

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: www.mydomainnamehere.org www.mydomainnamehere.com mydomainnamehere.com

This one doesn't work: mydomainnamehere.org - 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>
ServerAdmin [email protected]
ServerName mydomainnamehere.org
ServerAlias www.mydomainnamehere.org
ServerAlias mydomainnamehere.com
ServerAlias www.mydomainnamehere.com
DocumentRoot /home/www/mydomainnamehere.org/html/
ErrorLog /home/www/mydomainnamehere.org/logs/error.log
CustomLog /home/www/mydomainnamehere.org/logs/access.log combined
</VirtualHost>
1
  • Just a tip, use one ServerAlias line with each additional domain separated by a space.
    – Warner
    May 22, 2010 at 17:06

2 Answers 2

1

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

  1. Did you restart apache after adding mydomainhere.org ?
  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?
0

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.

Not the answer you're looking for? Browse other questions tagged .