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.

New Install, websites re-directed - /cgi-sys/defaultwebpage.cgi

Discussion in 'General Discussion' started by magicstuff99, Aug 23, 2014.

  1. magicstuff99

    magicstuff99 Member

    Joined:
    Aug 23, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    well, I'm completely stuck. I just installed cpanel, did the updates etc.. but when accessing either of my two test domains i get redirected to www.domain.com/cgi-sys/defaultwebpage.cgi which doesnt help. I have read the forums, #'d out the iipv6 listen lines on port 80 and 443, but still no joy. Ran the /scripts/rebuildhttpdconf, Any ideas would be great. I know the first thing members might say is "check old posts" but I have tried , so please point me in the right direction, if you can :)
     
  2. corporatehost

    corporatehost Member

    Joined:
    Jul 17, 2014
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi magicstuff99,

    If your domain is redirected to : cgi-sys/defaultwebpage.cgi, This means your apache server doesn't know what to do, so some misconfiguration in your apache server.

    This redirection can occur due to various reasons.

    1. If you have nginx installed and running in port 80 handling static content, and apache running in different port. Check whether the correct ips are added to the VirtualHosts.

    2. Did you Check with the Virtual Hosts Entry in the httpd.conf file for correct ips

    3. Is your server configured in NAT ?

    This redirection occurs in many senario . But not sure what's yours, until more information :)
     
  3. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Please try running /scripts/rebuildhttpconf and see if that helps.
     
  4. magicstuff99

    magicstuff99 Member

    Joined:
    Aug 23, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have copied parts of the httpd.conf it is helps:

    Code:
    <VirtualHost 203.161.107.200:80>
        ServerName 203.161.107.200
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin - removed -
        <IfModule mod_suphp.c>
            suPHP_UserGroup nobody nobody
        </IfModule>
    </VirtualHost>
    
    <VirtualHost 203.161.107.200:80>
        ServerName - removed -
        ServerAlias www.- removed -
        DocumentRoot /home/yabboohill/public_html
        ServerAdmin - removed -
        UseCanonicalName Off
    
    I can upload what ever you think could help.
    The local IP is 192.168.0.199, gw 192.168.0.2, all ports, 80, 443, 25, 110, 2083, 2087, 21, 587, from the router(static ip 203.161.109.200) forwarded to 192.168.0.199
    I have removed the accounts and put them back in again but still sites redirected to /cgi-sys/defaultwebpage.cgi
    any ideas?
     
    #4 magicstuff99, Aug 25, 2014
    Last edited by a moderator: Aug 25, 2014
  5. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I removed the domain name and your e-mail address, to protect your privacy and server security. I also wrapped the httpd.conf snippets in CODE tags. CODE tags cause a fixed-width font to be used, which makes the output look just like if you were viewing it in a terminal, and it is helpful when discussing configuration files and shell output.

    The problem is that you have your accounts configured on the public IP address, but requests come into the server on the private IP address. Change the account's IP address to the private IP address using Home » Account Functions » Change Site’s IP Address. Then, you will need to change the IP address in the DNS zone to the public IP address using Home » DNS Functions » Edit DNS Zone.

    Once you have made these changes, you will need to clear your browser cache, or use a different browser. The cgi-sys default page tends to be cached by browsers, so it can still look like the configuration is broken even after it is fixed.
     
  6. magicstuff99

    magicstuff99 Member

    Joined:
    Aug 23, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Great, your solution worked. I tried changing the sites IP to the internal, then DNS would stuff-up, then both on external, then apache would stuffup. Your fix worked. Thanks for your support. :) "CPanel=Great Product & Great Support".
     
  7. hjalmar.reitz

    hjalmar.reitz Registered

    Joined:
    Jan 13, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi Jared, hope you don't mind helping me out too here. I have exactly the same problem here, however, when I go to "Account Functions » Change Site’s IP Address" I only have Public IP's to pick from.
    When I go to "IP Functions > Add a new IP address", and add the internal IP of the server, I'm told that it's already been applied.
    My setup is the same as 'magicstuff99', Basically VPS behind a firewall, with two NIC's, both with internal IP's, which are being NAT'd to public IP's.
    Also, my httpd.conf file shows the public IP address for 'VirtualHost publicip:80> for each account that I have on the server.

    Any help would be appreciated.
    Thank you kindly.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Is it possible the IP address is assigned to a single account as a dedicated IP address or is it not assigned to any accounts on your system?

    Thank you.
     
  9. hjalmar.reitz

    hjalmar.reitz Registered

    Joined:
    Jan 13, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi Michael, sorry for delayed response, I was expecting an email notification if anyone replied, seems I'm not getting these.
    Anyhoo, I assume you're referring to the internal interface IP yes?
    If so, then in at this menu location:
    IP Functions » Show or Delete Current IP Addresses
    I see the following information:

    Interface: eth0
    Local IP: 192.168.31.1
    Notes: Main/shared IP for: {reseller account} and root (I have removed the reseller name)
    Public IP: { x.x.x.x The public IP NAT'd to the internal interface by firewall appliance}

    Interface: eth0:cp1
    Local IP: 192.168.31.2
    Notes: (blank)
    Public IP: { x.x.x.x The public IP NAT'd to the internal interface by firewall appliance, different public address to interface eth0}

    Does this answer your question?
    Either way, it seems the internal IP of eth0 is what we're after here, and is assigned to a reseller and 'root'.


    If I go to menu location:
    Home »IP Functions »Change a Site’s IP Address

    I see in the drop down menu, that both the Publicly NAT'd IP's are listed. The IP that is being NAT'd to the interface eth0, says in brackets (shared with root {reseller name}.

    What you think?
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,787
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  11. hjalmar.reitz

    hjalmar.reitz Registered

    Joined:
    Jan 13, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Think I've resolved it now Michael. In reference to the post from Magicstuff99, where he lists the contents of the httpd.conf file. for the 'VirtualHost' IP address entry for each client account/domain, I changed this IP address (which was set to public IP) to the private IP address of the server. This seemed to fix it.
    I guess this httpd.config will get overwritten at some point when apache reloads the templates. I just need to figure out which template to edit to make this config static, perhaps you could point me to this?

    Thanks Michael.
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,787
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Right, in a NAT environment you should ensure the private IP address is assigned to the account in cPanel/WHM and the public IP address is used in the DNS zone.

    Thank you.
     
  13. hjalmar.reitz

    hjalmar.reitz Registered

    Joined:
    Jan 13, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Thanks Michael, well I think that's just where my problem started as per my first post, the private IP address isn't available to pick from the list when I go to "Home > IP Functions > Change a Site’s IP Address".
    I guess my only option is to fiddle with the templates now.
    Thank again for your help.
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,787
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    My previous suggestion still stands, which is opening a support ticket so we could take a closer look at why that IP is not available to be assigned to accounts.

    Thank you.
     
Loading...

Share This Page