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.

CGI files with .cgi extension don't run

Discussion in 'General Discussion' started by danf, Apr 15, 2008.

  1. danf

    danf Active Member

    Joined:
    Apr 10, 2006
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    CGI files on a recently upgraded cPanel server (upgraded from Apache 1.3 to 2.0) no longer work if they have a .cgi extension. If they have another extension (or no extension), they work fine.

    I have 3 identical files:

    /home/username/public_html/cgi-bin:
    -rwxr-xr-x 1 username groupname 58 Apr 15 03:45 test
    -rwxr-xr-x 1 username groupname 58 Apr 15 03:45 test.cgi
    -rwxr-xr-x 1 username groupname 58 Apr 15 03:45 test.sh

    The files all have UNIX line endings. These URLs load fine:

    http://www.example.com/cgi-bin/test
    http://www.example.com/cgi-bin/test.sh

    But this one times out every time:

    http://www.example.com/cgi-bin/test.cgi

    The call to test.cgi doesn't even show up in the access log. The access log and suexec log show the other two just fine.

    The VirtualHost section in /etc/httpd/conf/httpd.conf looks fine:

    ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup username groupname
    </IfModule>
    ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/

    There are no occurrences of RemoveHandler in any files in /etc/httpd/conf.

    Any ideas?

    Thanks.

    --df
     
  2. LiNUxG0d

    LiNUxG0d Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gatineau, Quebec, Canada
    Hey there df; granted there is no RemoveHandler, but is the AddHandler there in the general config? (not in the VHosts)

    Paste from my side:

    Let me know, let's see if we can get this working for you. :)

    Warmest regards,
     
  3. BlackRain

    BlackRain Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Had the same problem which apparently started on 13 April 2008.

    All domains hosted on one server lost all cgi-bin functionality.

    Just a general 500 error. Review of error logs did not provide any meaningful information beside "premature end of script headers".

    Did an upgrade to latest 'current' version of Cpanel and the issue is magically fixed.
     
Loading...

Share This Page