You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Thomas CarriƩ <th...@free.fr> on 2004/02/08 13:26:00 UTC
[users@httpd] Re: [Apache2 CGI] CGI file is not executed, source displayed instead
I've found the solutoin, the debian organisation of config files for
apache2 make mod_cgi disable by default, you have to enable it like this :
/etc/apache2/mods-enabled# ln -s /etc/apache2/mods-available/cgi.load
cgi.load
Thomas CarriƩ wrote:
> I have this problem with Apache/2.0.48 with default configuration file
> (from debian) that the default CGI script doesn't execute !
>
> Here is the CGI part of the config file :
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> See below that the pritenv script that I call runs ok on command line
> and apache2 has no mod_cgi in its list (is it normal ?, maybe mod_cgi is
> missing, how do I enable it ? need to recompile ?)
> ______
>
> # apache2 -l | grep cgi
> # cat /usr/lib/cgi-bin/printenv
> #!/usr/bin/perl
> # printenv -- demo CGI program which just prints its environment
> print "Content-type: text/plain\n\n";
> foreach $var (sort(keys(%ENV))) {
> $val = $ENV{$var};
> $val =~ s|\n|\\n|g;
> $val =~ s|"|\\"|g;
> print "${var}=\"${val}\"\n";
> }
> # ll /usr/lib/cgi-bin/printenv
> -rwxr-xr-x 1 root root 268 Nov 18 01:18
> /usr/lib/cgi-bin/printenv
> # /usr/lib/cgi-bin/printenv
> Content-type: text/plain
>
> HOME="/root"
> LOGNAME="root"
> ...
> ____
>
> I went through http://httpd.apache.org/docs-2.0/howto/cgi.html, my
> problem is listed in troubleshooting section but the link is broken
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org