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

I have an ubuntu with the the following config file:

<VirtualHost *:80>
    DocumentRoot /data/sites/

Other vhost files are being served correctly on this host. It is properly symlinked; the directory exists. Is there a reason why this is not working? I don't see anything in the standard apache server logs.


this is an ubuntu host and many other vhosts using the standard sites-available / sites-enabled are working. One issue is that it runs both mod_php and phusion mod_rails.

@Lain here's the output from a2ensite: jon@ve:/etc/apache2/sites-available$ sudo sudo a2ensite /etc/apache2/apache2.conf ERROR: No site found matching /etc/apache2/apache2.conf!

here's the output from apache2ctl -S (thx for this - I had always wondered how to to do this)

 jon@ve:/etc/apache2/sites-available$ /usr/sbin/apache2ctl -S
 VirtualHost configuration:
 wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server (/etc/apache2/sites-enabled/000-default:1)
         port 80 namevhost (/etc/apache2/sites-enabled/000-default:1)
         port 80 namevhost (/etc/apache2/sites-enabled/001-testfb:1)
         port 80 namevhost (/etc/apache2/sites-enabled/002-testfb2:1)
         port 80 namevhost (/etc/apache2/sites-enabled/
         port 80 namevhost (/etc/apache2/sites-enabled/
Syntax OK
share|improve this question
Is this your entire virtualhost container? Take a look at some of the other working vhosts, you are missing the location container. – Sean Kimball Sep 11 '11 at 15:04
What happens when you attempt to access Show us the output of /usr/sbin/apache2ctl -S. – Iain Sep 11 '11 at 16:55
If you don't see ANYTHING in your logs, are you sure that has that server's IP? – DerfK Sep 11 '11 at 17:10

2 Answers 2

Add to the file, between <VirtualHost>...</VirtualHost>:

<Directory /data/sites/>
    Order allow,deny
    allow from all

Make sure you have NameVirtualHost *:80 somewhere before this file is loaded. (You can stick it just before <VirtualHost *:80> to be sure.)

EDIT 2: Make sure you sudo a2ensite config_file config_file is the file that contains the <VirtualHost> block. Should be /etc/apache2/sites-available/ and you should use sudo a2ensite

Make sure you sudo apahce2ctl restart


Regarding logs, not sure what your global conf is. You may need this within <VirtualHost>...</VirtualHost>:

    ErrorLog /var/log/apache2/

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/ combined
share|improve this answer

If you really have created a vhost called then unless you have created your own DNS entry for it, it will not be resolving to your server so you won't see anything. It seems unlikely that you are the owner of so it's a not a good idea to be creating vhosts and DNS entries for it's sub domains yourself. Better to create a vhost and DNS entries for a domain that you control.

share|improve this answer
a DNS record has been created and it resolves correctly. It's currently showing the default apache site implying that there's something wrong with the apache configuration – timpone Sep 11 '11 at 17:28
Did you try a full restart sudo apache2ctl restart ? – xofer Sep 11 '11 at 17:39
yep, restarted, rebooted computer, everything... sorry, I know this is probably something REALLY stupid. I think it might be something with phusion passenger – timpone Sep 11 '11 at 17:51

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.