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 To change main site of shared IP

Discussion in 'General Discussion' started by ryno267, Sep 1, 2006.

  1. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    Let me set this up:

    my NS1. IP is *.30 and NS2 is *.23
    my main shared IP is *.29

    When you type in the *.29 IP one of the shared sites comes up, and thus does when new sites haven't propogated yet and are using temporary access.

    I want to change that site that comes up on the main *.29 IP address.

    The domain I want to change it to is the main domain on the NS1 *.30 IP

    Normally i know you can just move the domain on the same IP as *.29 to the top of the virtual hosts, but i'm nervous doing that as the domain I want to use is the main on *.30



    How do I get the domain.us that's the main on *.30 (NS1) to also be the default on my main shared IP of *.29

    Thanks guys!
     
  2. S n I p E r

    S n I p E r Member

    Joined:
    Aug 9, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello,


    sorry for delay,


    you can set the main site of shared ip to default (cpanel page) :)

    login via SSH

    1 -
    PHP:
    cd /usr/local/apache/conf 
    2 -
    PHP:
    cp httpd.conf httpd.conf.back
    3 -
    PHP:
    pico httpd.conf
    4 - press Ctrl + W
    5 - search for
    PHP:
    SSL Virtual Host Context
    6 - after :

    Code:
    ##
    ## SSL Virtual Host Context
    ##
    
    
    </IfDefine>
    add :

    Code:
    NameVirtualHost xxx.xxx.xxx.xxx:80
    
    <VirtualHost xxx.xxx.xxx.xxx>
    BytesLog domlogs/server.host.com-bytes_log
    ServerName server.host.com
    DocumentRoot /usr/local/apache/htdocs
    </VirtualHost>
    in the code above, change xxx.xxx.xxx.xxx with your shared ip

    change server.host.com with your host name.

    7 - Press Ctrl + X then type 'y' then 'enter' then 'enter' again :)

    restart the Apache by : service httpd restart

    try to open your shared ip you will find the default cpanel page :)

    Note : you can set the directory to an exist account on your server as the directory of the main site . and the server name to the domain of your main site.

    i hope that i helped ya :)


    Good Luck

    Ramy
     
Loading...

Share This Page