Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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>
    ServerAdmin admin@mydomain.info
    ServerName mydomain.info
    ServerAlias www.mydomain.info

    DirectoryIndex index.html
    DocumentRoot /var/www/vhosts/mydomain.info/htdocs

    LogLevel warn
    ErrorLog /var/www/vhosts/mydomain.info/log/error.log
    CustomLog /var/www/vhosts/mydomain.info/log/access.log combined

For the record, I am running Apache2 on Ubuntu 12.10

share|improve this question

1 Answer 1

up vote 3 down vote accepted

It sounds like you forgot to enable the site

a2ensite mydomain.info

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.