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've had no problem with vhosts before, but for some reason this one isn't pointing to the right document root. The domain is pointing to the correct IP, apache sees no errors with the config file in sites-available, yet it just isn't pointing correctly.

Here is the vhost config for the domain:

<VirtualHost *80>

    DirectoryIndex index.html
    DocumentRoot /var/www/vhosts/

    LogLevel warn
    ErrorLog /var/www/vhosts/
    CustomLog /var/www/vhosts/ combined

For the record, I am running Apache2 on Ubuntu 12.10

share|improve this question
up vote 3 down vote accepted

It sounds like you forgot to enable the site


Also, if the code above is an exact copy of your vhost definition then you'll need to change the first line to

<VirtualHost *:80>

otherwise you'll get an error

[Sun Nov 04 08:03:23 2012] [error] (EAI 5)No address associated with hostname: Could not resolve host name *80 -- ignoring!

share|improve this answer
I did enable a2ensite, but that missing colon was in fact the problem. I don't know why that error wasn't showing up on apache service restart though. – Morgan Nov 4 '12 at 18:59

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.