Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I had this working, then my VM server crashed.

I'm running Ubuntu on Oracle VirtualBox. Now I'm trying to add some server aliases, but it's not working.

In my 'sites-enabled' folder I have a file called This has the following data:

<VirtualHost *:80>
  DocumentRoot /var/www/mysite/

  <Directory />
    Options FollowSymLinks
    AllowOverride All

  <Directory /var/www/storelocator/>
    AllowOverride All
    Allow from all

But I'm still not able to access the site using It only shows me the folders in www root folder.

What am I missing here?

share|improve this question
Include the output of apache2ctl -S in your post. – adaptr Feb 29 '12 at 13:01
up vote 5 down vote accepted

Try removing your commas. I've always used spaces to delimit the hostnames (same goes for /etc/hosts as well)

share|improve this answer
Ah! That was it. Thanks :) – Steven Feb 29 '12 at 13:20

Your definitions seem totally correct to me. However this rather sounds like a DNS issue. Depending on your host, try refresh you DNS cache (depending on your OS) and check if matches the IP of your VM.

share|improve this answer
Since this is on a VirtualServer on my machine (running Win7) I'm not sure I have a DNS chache? Also, something I forgot to mention. I'm not getting a blank page. The page shows me the folders in www root folder. – Steven Feb 29 '12 at 12:46
I'm able to ping So it's def. DNS problem. – Steven Feb 29 '12 at 13:19
I never put up ServerAlias in one line, but one under the other. So this slipped past my scope here. Glad the comma-issue solved it for you. – Chris Feb 29 '12 at 13:44

Can you remove replace the ServerAlias line entry as given below, restart Apache and then try ?


sudo /etc/init.d/apache2 restart
share|improve this answer
Mike got onto this first :-) – Swapneel Patnekar Feb 29 '12 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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