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.

Website default ip web page

Discussion in 'Data Protection' started by VipGeek, Jun 30, 2007.

  1. VipGeek

    VipGeek Member

    Joined:
    Mar 31, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Our servers have multiple ip addresses. When someone types in the ip address of their website they get someone elses page. Usually its the first website put on that ip. Its become a huge problem. How do we change it so if someone puts in the ip address it redirects to our main website?

    Thanks
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You answered your own question ....

    You need to make your site first on the list under each IP address
    or a site that has a redirect to your site.

    When connecting by IP, Apache will display the first site it has in it's
    configuration that matches the same IP address
     
  3. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    right on Spiral

    Spiral is 100% right.

    this can be done by editing the order of the sites in your httpd.conf file


    I want to suggest you first backup your httpd.conf file before making any changes

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.working
    
    then in your favorite editor - go and play :)

    after your all done -

    in shell

    Code:
    service httpd restart 
    if it does not restart -

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.notworking
    
    then -
    Code:
    cp /usr/local/apache/conf/httpd.conf.working /usr/local/apache/conf/httpd.conf 
    
    save and restart httpd

    Code:
    service httpd restart
    Repeat these processes as needed.

    :D
     
Loading...

Share This Page