Re: Question about Files directive

[prev] [thread] [next] [Date index for 2005/03/02]

From: Carl Johnstone
Subject: Re: Question about Files directive
Date: 20:40 on 02 Mar 2005
CCing it back onto the list...

>>>>>
Now if I do not want all to specify
all cgi scripts (*.cgi) to be handled by the handler
precisely to avoid pitfalls and only specify
some files to be used, then how do I do
that via the Files directive.
<<<<<

There's a couple of different approaches.

The first you posted - list them individually. Alternatively the Files
directive will take a regular expression. The apache docs are here for v1.3
http://httpd.apache.org/docs/mod/core.html#files

Another way if all your cgi scripts are in a single cgi-bin or similar is to
setup different aliases. Then you can access the same scripts as straight
CGI, Apache::Registry, or Apache::PerlRun. I'll assume your cgi-bin is
already setup - here's the rest of the config.

  Alias /perl/ /path/to/cgi-bin/
  PerlModule Apache::Registry
  <Location /perl>
    SetHander perl-script
    PerlHandler Apache::Registry
    Options ExecCGI
    allow from all
    PerlSendHeader On
  </Location>

  Alias /perl-cgi/ /path/to/cgi-bin/
  PerlModule Apache::PerlRun
  <Location /perl-cgi>
    SetHander perl-script
    PerlHandler Apache::PerlRun
    Options ExecCGI
    allow from all
    PerlSendHeader On
  </Location>


Then you can try running your script through Apache::Registry with
http://www.mydomain.com/perl/myscript.cgi if that doesn't work then
http://www.mydomain.com/perl-cgi/myscript.cgi for Apache::PerlRun. Failing
any of those revert back to CGI with
http://www.mydomain.com/cgi-bin/myscipt.cgi.


Carl

Question about Files directive
Jain, Abhay K, ALABS 14:37 on 02 Mar 2005

Re: Question about Files directive
Sean Davis 14:43 on 02 Mar 2005

RE: Question about Files directive
Jain, Abhay K, ALABS 14:51 on 02 Mar 2005

RE: Question about Files directive
Perrin Harkins 16:18 on 02 Mar 2005

Re: Question about Files directive
Carl Johnstone 17:18 on 02 Mar 2005

Re: Question about Files directive
Markus Wichitill 14:56 on 02 Mar 2005

RE: Question about Files directive
Goehring, Chuck, RCI - San Diego 15:00 on 02 Mar 2005

Re: Question about Files directive
Tom Schindl 15:51 on 02 Mar 2005

RE: Question about Files directive
Goehring, Chuck, RCI - San Diego 16:16 on 02 Mar 2005

RE: Question about Files directive
Perrin Harkins 16:26 on 02 Mar 2005

RE: Question about Files directive
Goehring, Chuck, RCI - San Diego 16:36 on 02 Mar 2005

RE: Question about Files directive
Perrin Harkins 16:43 on 02 Mar 2005

Re: Question about Files directive
Stas Bekman 23:53 on 02 Mar 2005

Re: Question about Files directive
Carl Johnstone 04:34 on 03 Mar 2005

Re: Question about Files directive
Carl Johnstone 20:40 on 02 Mar 2005

RE: Question about Files directive
Goehring, Chuck, RCI - San Diego 01:58 on 03 Mar 2005

Generated at 20:12 on 07 Mar 2005 by mariachi v0.52