On Wed, 22 Aug 2001, Michael wrote:

> Before I make a dumb assumption, would the experts please comment on
> the scope of
>
> PerlSetVar within a virtual host statement. Is the scope restricted
> to that of the enclosing brackets. I have not been able to find where
> in the Eagle book or the guide the scope of these directives are
> shown.

Please review the following. I seems to be correct. Are there any other
mod_perl config directives that I've missed?

The three columns show whether a directive can be used in the
C<E<lt>DirectoryE<gt>> (and C<E<lt>LocationE<gt>>) and
C<E<lt>VirtualHostE<gt>> sections, or only in the global server
configuration.

  Directive        Globally VirtualHost Directory
  -----------------------------------------------
  PerlAddVar          V         V          V
  PerlFreshRestart    V         X          X
  PerlPassEnv         V         V          V
  PerlSetEnv          V         V          V
  PerlSetVar          V         V          V
  PerlSetupEnv        V         V          V
  PerlTaintCheck      V         X          X
  PerlWarn            V         X          X



> i.e.
>
> <virtualhost 123.111.222.210:80>
>   PerlSetVar ONE 1
> # this I can safely assume is global for the virtual host.
>
>   <Location /foo>
>    PerlSetVar protected ISfoo
>    ....blah
>   </location>
>   <Location /bar>
>    PerlSetVar protected ISbar
>    ...blah
>   </location>
> # does $r->dir_config(protected);
> # return the expected value depending on which directory has been
> # entered by the apache process to serve the file
>
>   <FilesMatch ".pl">
>     PerlSetVar scripts modperlofcourse
>   </filesmatch>
>   <FilesMatch ".cgi">
>    PerlSetVar scripts someothers
>   </filesmatch>
> # likewise, dos $r->dir_config(scripts);
> # return the expected values depending on the match process
>
> </virtualhost>
>



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to