The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you determine what page is displayed; server_.domain.com?

Discussion in 'General Discussion' started by Izkabola, Nov 29, 2004.

  1. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    I have server1.domain.com and when that is viewed, a clients website comes up. I don't want that to happen. I noticed that the clients website is first in the httpd.conf file. How can I go about changeing the page that is displayed there?

    Thanks in advanced!
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You've practically answered it yourself. You need to place the first site for any given IP address to be first in the list of virtualhost containers to show up so that any HTTP 1.0 connections go to that site of your choosing, rather than the one that just happened to be there.
     
  3. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    Usually it's the nice green background with the orange "No website configured at this address" ;)
     
  4. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Is there any easy way to add it without typing everything at the beginning?
     
  5. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    Find this section in /usr/local/apache/conf/httpd.conf

    <Location /whm-server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Location>

    Now above that section add this:

    <VirtualHost main.server.ip>
    BytesLog domlogs/hostname.here-bytes_log
    ServerName hostname.here
    DocumentRoot /usr/local/apache/htdocs
    </VirtualHost>

    then:

    /scripts/restartsrv httpd

    the above will show the green cPanel no website configured page when you go to http://mainip/
     
Loading...

Share This Page