Domain redirecting to /cgi-sys/defaultwebpage.cgi

section31

Active Member
Sep 3, 2003
33
0
156
San Antonio
[Moderation Note: Please see this post for the best answer.]

I removed an addon domain from an account and tried to re-add it to another account and now when i access the domain name it redirects me to domain.com/cgi-sys/defaultwebpage.cgi? Does anyone know how I can go about troubleshooting this? I've checked dns zone and it looks fine, I've also checked the vhost in httpd.conf and it seems ok too. What could be causing this?
 

dimitre

Registered
Dec 15, 2009
4
0
51
I'm having the same issue. any ideas? It seems to be the web template
I terminated my main account and re-added same domain with same IP
this is not related to .htaccess
 

rainboy

Active Member
Mar 2, 2004
34
3
158
Eindhoven
Having the same issue; only this time with a brandnew domain which as not been configured on the server before. Will create a ticket at cPanel for it though. And in this case there was not change in IP; also the account it was used as an addon on is using the main-shared-ip.
 

uk01

Well-Known Member
Dec 31, 2009
232
35
78
odd

hi

very odd problem, i'm having it too

i moved to a dedicated server today and the datacentre helping me set up did something to several domains and stopped it (i dont know what they did)

I just set up a new reseller and nameservers, and new shared ip. The domain was already resolving to the ip and nameservers.

But I get the default page thing. Now it must be getting to my server to show the default page so how can it be dns propagation?

Yet through hidemyass dot com proxy ip it displays ok!
 

headout

Well-Known Member
Aug 20, 2003
78
0
156
We have seen the same. New addon domains redirect to cgi-sys/defaultwebpage.cgi page. Even when we put an index(.html) file in their directory. Any solution for this?
 

egillette

Well-Known Member
Jan 5, 2010
72
0
56
Orlando, FL
cPanel Access Level
DataCenter Provider
Twitter
I figured it out!

I rarely post on forums, but nowadays since I've been working more and more with Linux based servers, and can't stand it when I'm looking for a solution and no one has posted the answer, I have decided to start posting every time I figure something out no matter where I originally looked!

Okay, so here's how I resolved the problem:

1) You will need to edit httpd.conf (I suggest using locate to find yours, since the paths on everyone's systems vary -- try "locate httpd.conf")

2) You will likely find an entry like this:

Code:
<VirtualHost *:80>
    ServerName www.yourdomain.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
    UserDir disable
</VirtualHost>
3) You'll need to change the above to show this instead:

Code:
<VirtualHost XXX.XX.XXX.XXX:80>
    ServerName www.yourdomain.com
    DocumentRoot /home/yourdom/public_html
    ServerAdmin [email protected]
    UserDir disable
</VirtualHost>
2 Things Have Been Changed:

1) Notice the XXX's -- these XXX's will need to be replaced by the IP address that this domain is hosted on (i.e. 123.45.67.89).

2) Notice how the document root has been changed (you'll need to find the document root for your domain specifically, it's usually the first 7 letters of the domain name or username for the account.

Now for the last step. . .either in WHM or in SSH restart apache (i.e. "service httpd restart") -- you *might* get error messages as shown below:

[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost XXX.XX.XXX.XX:80 has no VirtualHosts
[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost XXX.XX.XXX.XX:80 has no VirtualHosts
[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost *:0 has no VirtualHosts
[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost *:80 has no VirtualHosts

However, these are just warnings, and Apache will still start.

If you want to get rid of the error messages like I did later on, then you'll need to use WHM to define the VirtualHost template for your domains, since WHM writes to httpd.conf too.

The next step (don't know why this was necessary, but it worked):

CLEAR YOUR BROWSER'S CACHE

Final Step:

Create an .htaccess file in the directory that contains your index.html or index.php file, with the following SINGLE line:

Code:
DirectoryIndex index.html index.php
BTW, if you created this file as root in SSH, you'll need to CHOWN the file to your web user (again first 7 letters of the domain name or username), and then CHGRP the file the same way to your web user, so that Apache can access it (kinda weird, since in Plesk, even if root owns the .htaccess file, apache can still access it, but not in cPanel for whatever reason).

Reload the web page (i.e. www.yoursite.com). . .and you should be in business.

If not, try going directly to a page on your server (i.e. index.html for example), and that will usually force your browser to refresh the content its pulling from the site.

Anyway. . .I hope this helps, and I hope it was thorough enough -- if not, just shoot me a message, and I'll try to help ya out! ;)

- Eric Gillette
 

Sled151

Member
May 18, 2004
8
0
151
Very disturbing

I just set up a WHM/Cpanel server yesterday after doing it myself for the past 2 years. I had a WHM server for 3 years previous and had minimal issues. Seems to me that this is a fairly large problem for a company who's been in the game this long.
Not happy when I paid $425 for a license for a control panel then need to manually edit httpd.conf and htaccess to get the frikken sites to work correctly.

WTF?:mad:
 

Hostbox.be

Well-Known Member
Nov 4, 2002
61
0
156
Any solution ?

I made a new account today and I am getting this redirect also ?

/cgi-sys/defaultwebpage.cgi

with error:

Template Error: The template file must be given


My version: cPanel 11.25.0-R42399 - WHM 11.25.0 - X 3.9

Everything seems OK when I look at this account and in httpd.conf
 

Hostbox.be

Well-Known Member
Nov 4, 2002
61
0
156
This is not a proper way to solve the problem, I want to stick to STABLE releases.

Now, the error is gone by creating a Default Website Template via WHM.

But when adding a index.html of index.php to the public_html folder of the account, the redirect keeps active ?