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.

Ip Address Problems

Discussion in 'General Discussion' started by jthomas, Apr 10, 2008.

  1. jthomas

    jthomas Active Member

    Joined:
    Jul 31, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I have 7 IP addresses on a new server that I bought which is running cent and cpanel/whm.

    I set up the main server IP as the shared IP address

    I then set up IP's 2 and 3 and the nameserver IP's.

    ns1 and ns1 if you go to them through their IP addresses it gives the cpanel successfully installed message.

    however after a site is added to the main shared IP, if anyone goes to the main server ip address, instead of getting the cpanel successfully installed message, they are directed to the site of the account that was added. am i doing something wrong in the set up? I hope i was able to explain this properly.

    Thank You
     
  2. LiNUxG0d

    LiNUxG0d Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gatineau, Quebec, Canada
    Hi jthomas,

    I've seen this happen quite a bit. This usually occurs because the default VHost for the server is missing from the httpd.conf file. When cPanel is setup, usually, the default IP (main shared) has a VHost setup, as the FIRST VHost in the httpd.conf. This is the default that's show when the IP is typed in.

    Example, in my httpd.conf, the first VHost I see is...

    Code:
    <Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from localhost
    </Location>
    
    <Location /server-info>
        SetHandler server-info
        Order deny,allow
        Deny from all
        Allow from localhost
    </Location>
    
    
    # SUEXEC is supported
    
    Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
    Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"
    
    [B]# DO NOT EDIT. AUTOMATICALLY GENERATED
    NameVirtualHost 1.2.3.4:80
    NameVirtualHost *
    # DO NOT EDIT. AUTOMATICALLY GENERATED
    
    <VirtualHost 1.2.3.4:80>
        ServerName host.name.com
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin admin@yourcompany.com
    </VirtualHost>
    
    # Default vhost for unbound IPs
    
    <VirtualHost *>
        ServerName host.name.com
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin admin@yourcompany.com
    </VirtualHost>[/B]
    
    Where 1.2.3.4 is my main shared IP.

    Sometimes, I've seen this being pushed down in the config, or removed magically. I don't know why this occurs, but once it does, it will take the FIRST VHost in line and will display it as the default.

    Try to add the above (it's in bold), if it's not there, and replace 1.2.3.4 with the default server IP (shared IP). When people access whatever that's unrouted, it'll go to that default cPanel page instead.

    Hope this can help you, let me know if it doesn't.

    Warmest regards,
     
  3. mbd5882

    mbd5882 Well-Known Member

    Joined:
    Apr 30, 2005
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Manchester, United Kingdom
    cPanel Access Level:
    Root Administrator
    hey,
    i believe this is the problem we are getting > http://forums.cpanel.net/showthread.php?p=359920
    thanks for checking it and providing a fix :) ill try it when i get home later. shouldnt this be posted in the cpanel bug tracker?


    regards
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If it's not fixed by doing


    /scripts/rebuildhttpdconf

    Then please report your full cPanel version number.
     
  5. DCH

    DCH Member

    Joined:
    May 4, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Threadjack!

    Sorry for the threadjacking - but this is very closely related....

    With the new system, I can't figure out how to change the default page that is seen when a user visits a specific IP via browser.

    Example:
    User goes to http://1.2.3.4/
    They see the server's default html page.

    I'd like IP 1.2.3.4 to resolve to the reseller's page that has control of the IP.
    Previously, I could just manipulate the httpd.conf by moving around the vhost to the proper spot in the file to make this happen.

    Now.... I don't have a clue how to change it via the includes....

    Any help?
     
Loading...

Share This Page