Re: Question about Files directive

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

From: Carl Johnstone
Subject: Re: Question about Files directive
Date: 17:18 on 02 Mar 2005
Hi,

To explain exactly what is going on...

The "Files" directive is an *apache* not mod_perl directive. You can use it 
within apache to define specific rules for a file (or bunch of files).

The "SetHandler" directive is also an apache directive, that tells apache 
what hander should be used.

So for instance this:

    <Files *.cgi>
        SetHandler perl-script
    </Files>

tells apache that all files matching *.cgi should be handled by perl-script 
which is mod_perl.

The "PerlHandler" directive is mod_perl, it tells mod_perl which perl module 
should be used as the handler.

In the case of Apache::Registry this is a perl module that attempts to 
provide some of the advantages of mod_perl to regular cgi scripts. In 
particular you get use of the built-in perl interpreter, and your perl files 
are only interpreted when they are changed rather than everytime they are 
requested. This is the "cache" that you referred to in your first post.

The "Options" directive sets permissions, in this case it allows files to be 
executed as CGI. This option is also required by Apache::Registry.


Now you'll have to be very careful as you're not really caching CGI scripts. 
The Apache::Registry module does a reasonable job of making things works, 
but there are issues to be wary of. The "porting" page that's already been 
suggested lists all the pitfalls.

You may also want to investigate Apache::PerlRun. This is similar to 
Apache::Registry in that it uses the built-in perl interpreter but it 
reloads the script on every request. This means that it doesn't give the 
same performance benefit that Apache::Registry does, but on the other hand 
it's immune to some of the problems.

Hope this answers your question.

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