Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Jun 2008
    Posts
    30

    Default Bad Hostname

    Hello

    Today, Ive just realised that when I go to http://web1.bullsofthosting.co.uk/ I get the error: "Bad Request (Invalid Hostname)"

    Usually, it shows the default cPanel page.

    Does anyone know how to correct this?

    Thanks
    Thomas
    Bullsoft Hosting
    Quality web hosting since 2008
    www.bullsofthosting.co.uk

  2. #2
    Member
    Join Date
    Jun 2007
    Posts
    138

    Default

    Please confirm your VirtualHost section for this domain is configured properly.

    Also provide the Apache error log
    LogicSupport.com - Support That Makes Sense!
    Quality Server Management & Web Hosting Support

  3. #3
    Member
    Join Date
    Jun 2008
    Posts
    30

    Default

    Quote Originally Posted by logicsupport View Post
    Please confirm your VirtualHost section for this domain is configured properly.
    How can I check this?

    Quote Originally Posted by logicsupport View Post
    Also provide the Apache error log
    Ive attached the Apache error log.

    Thanks
    Thomas
    Attached Files
    Bullsoft Hosting
    Quality web hosting since 2008
    www.bullsofthosting.co.uk

  4. #4
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by TomBullock View Post
    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.
    Last edited by Spiral; 07-13-2009 at 05:59 PM.

  5. #5
    Member
    Join Date
    Jun 2008
    Posts
    30

    Default

    Just noticed on the above post that the IP address is wrong.
    Could this be the problem?

    Thanks
    Thomas
    Bullsoft Hosting
    Quality web hosting since 2008
    www.bullsofthosting.co.uk

  6. #6
    Member jenlepp's Avatar
    Join Date
    Jul 2005
    Location
    Liberty Hill, TX
    Posts
    115
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    I had this on two new servers I set up - checked httpd conf and the block just wouldn't get in there.

    Wound up including it, restarting, and it worked fine, so I didn't bother trying to figure out why cPanel didn't create it on its own.
    Jen Lepp
    Director of Customer Service
    A Small Orange Homegrown Hosting | http://www.asmallorange.com

  7. #7
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by TomBullock View Post
    Just noticed on the above post that the IP address is wrong.
    Could this be the problem?

    Thanks
    Thomas
    What do you mean "IP ADDRESS IS WRONG?"

    If you are talking about my post, I deliberately changed the last digit
    of your IP address so that it isn't publicly posted in the forums and
    I left a note to that effect in my post if you read it.

    The IP address I obtained by doing a DNS lookup of your hostname.
    If that is not the IP address it is supposed to be then that is your problem
    and you would need to go check your zone files in /var/named

  8. #8
    Member
    Join Date
    Jun 2008
    Posts
    30

    Default

    Quote Originally Posted by Spiral View Post
    What do you mean "IP ADDRESS IS WRONG?"
    The IP you have obtained is: 67.21.83.22.??
    Whilst my actual IP is: 69.162.75.??

    Ive just edited the "web1.domain.com.db" file in which I found the wrong IP address and changed it to the new one so ill see if that works.

    Thanks
    Thomas
    Bullsoft Hosting
    Quality web hosting since 2008
    www.bullsofthosting.co.uk

Similar Threads & Tags
Similar threads

  1. Hostname changed. cPanel/WHM still try to access original hostname
    By Nathan D. in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 09-24-2009, 04:42 PM
  2. Subdomain problem Bad Request (Invalid Hostname)
    By shareb in forum New User Questions
    Replies: 3
    Last Post: 05-18-2009, 03:22 PM
  3. SSL cert works for hostname/cpanel but not hostname:2082
    By foxphiles in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-30-2008, 09:12 AM
  4. wrong fs type, bad option, bad superblock
    By katmai in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-05-2007, 01:40 PM
  5. Nick Nick Nick!!! /tmp full ...bad bad bad
    By rpmws in forum cPanel and WHM Discussions
    Replies: 22
    Last Post: 10-21-2005, 09:35 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube