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

Reply via email to