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
[email protected]
## 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.