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

magicstuff99

Member
Aug 23, 2014
7
0
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 :)
 

corporatehost

Member
Jul 17, 2014
24
0
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 :)
 

magicstuff99

Member
Aug 23, 2014
7
0
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?
 
Last edited by a moderator:

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
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.
 

magicstuff99

Member
Aug 23, 2014
7
0
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".
 

hjalmar.reitz

Registered
Jan 13, 2015
4
0
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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.
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.
 

hjalmar.reitz

Registered
Jan 13, 2015
4
0
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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.
 

hjalmar.reitz

Registered
Jan 13, 2015
4
0
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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.
 

hjalmar.reitz

Registered
Jan 13, 2015
4
0
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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.
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.