
Originally Posted by
TomBullock
Hello
Today, Ive just realised that when I go to
http://HOSTNAME/ I get the error: "Bad Request (Invalid Hostname)"
Usually, it shows the default cPanel page.
Does anyone know how to correct this?
Thanks
Thomas
I did an nslookup of your domain, attempted a zone transfer,
checked the WHO, and also ran a dig of the hostname DNS records,
and some other basic checks.
Your DNS records are pretty basic but setup correctly so I don't
believe you are having any DNS issue that can sometimes account
for this sort of thing.
When I connect to your IP address directly "67.21.83.22?", I
get the exact same message returned so that is indeed what your
server is delivering as the default and isn't just that you had some
hostname vhost setup with problems with it now.
That given, I would say that something has happened to your
default vhost (first entry in your httpd.conf) or the files for the host
themselves (/usr/local/apache/htdocs) have been removed or the
permissions changed so they are not accessible.
I'd look at /usr/local/apache/httpd.conf and check out your default
page virtualhost entry which should be the first one you come to
when reading the configuration file down from top to bottom:
Code:
<VirtualHost 67.21.83.22?:80>
ServerName !!!YOUR SERVER HOSTNAME!!!
DocumentRoot /usr/local/apache/htdocs
ServerAdmin !!!YOUR EMAIL ADDRESS HERE!!!
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
UserDir disable
</VirtualHost>
(I dropped the last digit of your IP above for security)
If it is missing or moved to someplace other than the first entry then
you need to replace it or move it back.
Don't forget to run the cpanel distiller process and restart Apache
if you need to make any changes to the httpd.conf file:
Code:
# service httpd configtest
Syntax OK
# /usr/local/cpanel/bin/apache_conf_distiller --update
# service httpd restart
# service httpd status
I would also check the folder /usr/local/apache/htdocs and make sure
the folder and the files in it are readable by user "nobody" and
that you have a proper index file in there. This is where you
normally get the default Cpanel page displayed.