[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache mod_perl + mod_cgi in same directory



"Robert A. Jacobs" wrote:
> 
> Is it possible to enable CGIs (shell scripts, C/C++ apps, etc.) and
> CGI perl-scripts to both operate out of the same directory?  I know you can do
> this if you add ".pl" to the list of extensions approved under the handler
> "cgi-script"...what I want to be able to do is have perl-scripts handled by the
> PerlHandler.
> 
What about (in srm.conf):

# plain cgi-bin:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

# Apache::Registry mode
ScriptAlias /cgi-modperl/ /usr/lib/cgi-bin/

Then (in access.conf):

<Location /cgi-bin>
AllowOverride None
Options ExecCGI FollowSymLinks
allow from all
</Location>

<Location /cgi-modperl>
AllowOverride None
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
allow from all
</Location>

Of course, the users would still have to enter different locations in
the browser, but the files would reside in the same directory.

Kind of nice, because you can test your Perl scripts both under mod-perl
and otherwise.



Reply to: