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

I've used CPanel's WebHost Manager to create a new host on my VPS. I then used my HOSTS file to point fake.com to the relevant IP address. The problem I'm having now is, Apache isn't recognizing the VHost,or something, as it's just loading the default entry and 404'ing every document I try to GET.

Here's the VHost entry

NameVirtualHost 0.0.0.209:80
NameVirtualHost 0.0.0.211:80 

<VirtualHost 0.0.0.209:80>
    ServerName fake.com
    ServerAlias www.fake.com
    DocumentRoot /home/fakecom/public_html
    ServerAdmin webmaster@fake.com
    ## User fakecom # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup fakecom fakecom
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup fakecom fakecom
    </IfModule>
    CustomLog /usr/local/apache/domlogs/fake.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/fake.com combined
    Options -ExecCGI -Includes
    RemoveHandler cgi-script .cgi .pl .plx .ppl .perl
    ScriptAlias /cgi-bin/ /home/fakecom/public_html/cgi-bin/
</VirtualHost>

I've Google'd this profusely and all that's being returned is 'DNS errors. Wait for it to propagate'. That's obviously not my problem, since I'm using HOSTS.

What else could be causing this? :/

EDIT: Forgot to mention. http://fake.com/~fakecom/test.html loads just fine. So the fake.com is pointing to the right IP.

share|improve this question
    
Does anything show up in the account's access logs? –  calman Apr 29 '11 at 19:00
add comment

1 Answer

Check the content of /etc/nsswitch.conf. Make sure the "hosts:" start with files before anything else. Also try using and see if Apache still complain.

share|improve this answer
add comment

Your Answer

 
discard

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