Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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,460
    Likes Received:
    21
    Trophy Points:
    463
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    168
    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:
    156
    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:
    168
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice