Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Customizing cgi-sys/defaultwebpage.cgi

Discussion in 'General Discussion' started by GoWilkes, Aug 20, 2012.

  1. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    400
    Likes Received:
    5
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Due to an error on my end (stupid typo) while configuring httpd.conf last night, I had about an hour where anyone visiting my site was redirected to cgi-sys/defaultwebpage.cgi.

    The error is fixed now, but anyone using Chrome that visited the site last night while I had an error is still being redirected to defaultwebpage.cgi.

    This appears to be a minor caching problem. I've had a few people to email, and I've told them to go to example.com/?z=1; the dummy variable is bypassing the cache, and then it works. But of course, there's no way of knowing how many people are still seeing the defaultwebpage.cgi, but HAVEN'T emailed.

    I tried to recreate defaultwebpage.cgi at /usr/local/cpanel/cgi-sys/ with a regular Perl script, changed the permission to 0755, and chown to root:wheel, but I still get an ISE. I see that the original defaultwebpage.cgi is either compiled or encrypted, though, so I'm guessing that I can't run a regular script here?

    Here's the script that I tried:

    #!/usr/bin/perl

    $home = "http://$ENV{'HTTP_HOST'}";
    $time = time();

    print "Location: $home/?z=$time\n\n";
    exit;

    Is there something else that I need to do to this script in order to make it run, or are ASCII scripts simply not allowed in /cgi-sys/?
     
  2. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    400
    Likes Received:
    5
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    For anyone else following this...

    Apparently, the error actually goes to /usr/local/apache/htdocs/index.html, which then redirects to /cgi-sys/defaultwebpage.cgi. So, I can change the META redirect instead of dealing directly with defaultwebpage.cgi.

    It's not exactly the solution I wanted, but it works for this error.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice