You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by DvDmanDT <dv...@telia.com> on 2002/07/26 14:12:54 UTC

Re: [users@httpd] newest to apache

Except that the cgi-bin folder accutually is an alias, ScriptAlias, and
therefore it doesn't need ExecCGI even if it has the same functionality...

In httpd.conf you must also search for something like
#AddHandler cgi-script .cgi
and you must remov the # and add .pl at the end... THEN add
Options ExecCGI
to the folder where you need it... I did it like this:

    LoadFile "D:\Srv\Apache\mod_perl-1.3\Perl\bin\perl56.dll"
    LoadModule perl_module modules/mod_perl.so
    AddHandler cgi-script .cgi
    <IfModule mod_perl.c>
    PerlModule Apache::Registry
    PerlSendHeader On
    <Files *.pl>
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options ExecCGI
    </Files>
    <Files *.cgi>
    #SetHandler perl-script     #Uncomment this and next line to get .cgi's
handled by mod_perl
    #PerlHandler Apache::Registry
    Options +ExecCGI
    </Files>
    </IfModule>

To make .pl files get handled as CGI's, comment out these lines:
    PerlModule Apache::Registry
    PerlSendHeader On
and
    SetHandler perl-script
    PerlHandler Apache::Registry

Also, change
AddHandler cgi-script .cgi
to
AddHandler cgi-script .cgi .pl

// DvDmanDT
MSN: dvdmandt@hotmail.com
Mail: dvdmandt@telia.com
----- Original Message ----- 
From: "Brian Dessent" <br...@dessent.net>
To: <us...@httpd.apache.org>
Sent: Saturday, July 26, 2003 12:40 PM
Subject: Re: [users@httpd] newest to apache


> awongxi wrote:
>
> > path is ok, and it works when I run it on command line... well I Would
> > like to see this script working via a browser so I place the script
> > under /var/www/html and chmod 755 to it. well the localhost/hello.pl
>
> Move the script to the cgi-bin directory, or enable ExecCGI for the
> directory the script is in.  Apache won't run scripts in a directory
> without this option enabled.  Somewhere in your httpd.conf, there's
> probably a section similar to
>
> <Directory "/var/www/html">
>     ...
>     Options Indexes FollowSymLinks MultiViews
>     ...
> </Directory>
>
> You must add "ExecCGI" to this list of options, or just move the script
> from the cgi-bin directory (which likely already has ExecCGI enabled.)
>
> Brian
>
> ---------------------------------------------------------------------
> 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