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.

shared IP shows website

Discussion in 'General Discussion' started by DWHS.net, Jan 16, 2014.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    The shared IP shows a website instead of the default page [Removed URL]

    Without changing the Apache config file is there something in cpanel I can change to fix this?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,674
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You should be able to return it to the default state by rebuilding the Apache configuration file via:

    Code:
    /scripts/rebuildhttpdconf
    Thank you.
     
  3. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Still no luck, here is the output: info [rebuildhttpdconf] Missing owner for domain dwhs6.dwhs.net, force lookup to root
    Built /usr/local/apache/conf/httpd.conf OK
     
  4. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    It is due to the default virtualhost entries are missing. Add following lines immediately after NameVirtualHost definitions ( make sure you edit IP, Hostname and email address ) and run distiller , restart apache.

    ===========
    <VirtualHost <shared IP>:80>
    ServerName 198.235.134.106
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin info@yourdomain.com
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>
    </VirtualHost>


    # Default vhost for unbound IPs

    <VirtualHost *>
    ServerName <hostname>
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin info@yourdomain.com
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>
    </VirtualHost>
    ====================

    Run another conf rebuild to make sure it persists.
     
    #4 NixTree, Jan 16, 2014
    Last edited: Jan 16, 2014
  5. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I have fixed it by moving both /etc/userdomains and httpd.conf . Then executed /scripts/updateuserdomains and /scripts/rebuildhttpdconf

    Thanks
    Sreeni
     
  6. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    So I added this:

    <VirtualHost 66.249.137.6:80>
    ServerName dwhs6.dwhs.net
    DocumentRoot /usr/local/apache/htdocs
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>
    </VirtualHost>


    # Default vhost for unbound IPs

    <VirtualHost *>
    ServerName dwhs6.dwhs.net
    DocumentRoot /usr/local/apache/htdocs
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>

    And well apache crashed, oddly enough when I removed it and restarted apache it's redirecting correctly now.

    Thanks!
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,674
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's possible that initially running /scripts/rebuildhttpdconf resolved the issue and you were viewing cached data in your browser.
     
  8. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Yep, that would make more since. I of coursed refreshed but you never know with caches.

    Thanks!
     
Loading...

Share This Page