CGI scripts are not working. Getting failed with Internal Server Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tushir
    New Member
    • Dec 2012
    • 1

    CGI scripts are not working. Getting failed with Internal Server Error

    Errors in error log are:

    [Mon Dec 31 13:22:31 2012] [error] [client 57.219.108.65] (13)Permission denied: exec of '/var/www/cgi-bin/first.cgi' failed
    [Mon Dec 31 13:22:31 2012] [error] [client 57.219.108.65] Premature end of script headers: first.cgi

    Script is working fine when tried to execute manually using perl interpreter.

    It has 755 permission as well.

    SELinux is disabled.

    Apache settings

    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

    Code:
    <Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI
    Order allow,deny
    Allow from all
    </Directory>
    Below are version details:

    [root@atl-mc-vjb002 logs]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 5.5 (Tikanga)

    [root@atl-mc-vjb002 logs]# httpd -version
    Server version: Apache/2.2.3
    Server built: Feb 22 2012 10:54:44
    [root@atl-mc-vjb002 logs]# perl -v

    This is perl, v5.8.8 built for x86_64-linux-thread-multi


    [root@atl-mc-vjb002 logs]# sestatus
    SELinux status: disabled
    I have tried disabling suexec as well but it also did not help.

    Same cgi page is working fine on other server.
    Last edited by zmbd; Dec 31 '12, 02:42 PM. Reason: [Z{Please use the <CODE/> button to format posted code/html/sql}]
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    [quoot]Script is working fine when tried to execute manually using perl interpreter. [/quoot]

    Did you try that under the same user as the owner of the apache process?

    Comment

    Working...