How to disable mod_perl in a subdir (apache)

2002-05-14 Thread Erchinger, Ethan

Hi all,
I saw a posting about this subject from earlier this year.  I'm unable to
make this work, and was hoping for some help.  I have a Location directive
for / (for the entire docroot).   I would like to make one subdirectory not
be handled by perl-script, but am unable to do so.  Excerpt from httpd.conf:

~snip~
PerlModule Apache::DBI
PerlFreshRestart On
PerlRequire /etc/apache/handler.pl
Directory /var/www
Options FollowSymLinks
AllowOverride None
order allow,deny
allow from all
/Directory

Location /
   SetHandler perl-script
   PerlHandler HTML::Mason
/Location
~snip~

I'm trying to make it so that, a subdir, like /yadda-yadda, is _not_ handled
by Mason.  Here is what I've tried to do:

Location /yadda-yadda
RemoveHandler .html
/Location

I've also tried moving the Location / directive contents into the above
Directory, seeing as the docs mention that Location directives override
a Directory directive, with no luck.

Yet these files are still being served through Mason, and I can't figure out
why.  Should my handler.pl (startup.pl) be moved so that it's not executed
in that Location?  I've read as much as I can find on Apache's site, with no
luck.

Debian 2.2r3
Apache/1.3.9
Mod_perl 1.21

Thanks all,
Ethan Erchinger



Re: How to disable mod_perl in a subdir (apache)

2002-05-14 Thread Tim Burden

Try
Location /yadda-yadda
SetHandler default-handler
/Location


- Original Message -
From: Erchinger, Ethan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 14, 2002 11:50 AM
Subject: How to disable mod_perl in a subdir (apache)


 Hi all,
 I saw a posting about this subject from earlier this year.  I'm unable to
 make this work, and was hoping for some help.  I have a Location
directive
 for / (for the entire docroot).   I would like to make one subdirectory
not
 be handled by perl-script, but am unable to do so.  Excerpt from
httpd.conf:

 ~snip~
 PerlModule Apache::DBI
 PerlFreshRestart On
 PerlRequire /etc/apache/handler.pl
 Directory /var/www
 Options FollowSymLinks
 AllowOverride None
 order allow,deny
 allow from all
 /Directory

 Location /
SetHandler perl-script
PerlHandler HTML::Mason
 /Location
 ~snip~

 I'm trying to make it so that, a subdir, like /yadda-yadda, is _not_
handled
 by Mason.  Here is what I've tried to do:

 Location /yadda-yadda
 RemoveHandler .html
 /Location

 I've also tried moving the Location / directive contents into the above
 Directory, seeing as the docs mention that Location directives
override
 a Directory directive, with no luck.

 Yet these files are still being served through Mason, and I can't figure
out
 why.  Should my handler.pl (startup.pl) be moved so that it's not executed
 in that Location?  I've read as much as I can find on Apache's site, with
no
 luck.

 Debian 2.2r3
 Apache/1.3.9
 Mod_perl 1.21

 Thanks all,
 Ethan Erchinger




RE: How to disable mod_perl in a subdir (apache)

2002-05-14 Thread Erchinger, Ethan


 Try
 Location /yadda-yadda
 SetHandler default-handler
 /Location

I tried that as well.  Do you think it could be the startup.pl (handler.pl),
shouldn't that only get run when the handler is perl-script?

EE


 Subject: How to disable mod_perl in a subdir (apache)


 Hi all,
 I saw a posting about this subject from earlier this year.  I'm unable to
 make this work, and was hoping for some help.  I have a Location
directive
 for / (for the entire docroot).   I would like to make one subdirectory
not
 be handled by perl-script, but am unable to do so.  Excerpt from
httpd.conf:

 ~snip~
 PerlModule Apache::DBI
 PerlFreshRestart On
 PerlRequire /etc/apache/handler.pl
 Directory /var/www
 Options FollowSymLinks
 AllowOverride None
 order allow,deny
 allow from all
 /Directory

 Location /
SetHandler perl-script
PerlHandler HTML::Mason
 /Location
 ~snip~

 I'm trying to make it so that, a subdir, like /yadda-yadda, is _not_
handled
 by Mason.  Here is what I've tried to do:

 Location /yadda-yadda
 RemoveHandler .html
 /Location

 I've also tried moving the Location / directive contents into the above
 Directory, seeing as the docs mention that Location directives
override
 a Directory directive, with no luck.

 Yet these files are still being served through Mason, and I can't figure
out
 why.  Should my handler.pl (startup.pl) be moved so that it's not
executed
 in that Location?  I've read as much as I can find on Apache's site, with
no
 luck.

 Debian 2.2r3
 Apache/1.3.9
 Mod_perl 1.21

 Thanks all,
 Ethan Erchinger



RE: How to disable mod_perl in a subdir (apache)

2002-05-14 Thread Drew Taylor

At 08:58 AM 5/14/02 -0700, Erchinger, Ethan wrote:

  Try
  Location /yadda-yadda
  SetHandler default-handler
  /Location

I tried that as well.  Do you think it could be the startup.pl (handler.pl),
shouldn't that only get run when the handler is perl-script?

If you have a PerlRequire startup.pl statement in your httpd.conf, 
startup.pl will always be run as Apache is starting up. It has nothing to 
do with the Set/AddHandler directives. I'm sure there is a section in the 
guide (http://perl.apache.org/guide/) which has more info, but I don't have 
a link handy.

Drew

==
Drew Taylor  |  Freelance web development using
http://www.drewtaylor.com/   |  perl/mod_perl/MySQL/postgresql/DBI
mailto:[EMAIL PROTECTED]   |  Email jobs at drewtaylor.com
--
Speakeasy.net: A DSL provider with a clue. Sign up today.
http://www.speakeasy.net/refer/29655
==




Re: How to disable mod_perl in a subdir (apache)

2002-05-14 Thread Tim Tompkins

Make sure you put it after the Location directive that sets HTML::Mason

Location /
SetHandler perl-script
PerlHandler HTML::Mason
/Location

/Location /yadda-yadda
SetHandler default-handler
/Location


Regards,

Tim Tompkins
--
Programmer
http://www.arttoday.com/
http://www.rebelartist.com/
--
- Original Message -
From: Erchinger, Ethan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 14, 2002 8:58 AM
Subject: RE: How to disable mod_perl in a subdir (apache)



 Try
 Location /yadda-yadda
 SetHandler default-handler
 /Location

I tried that as well.  Do you think it could be the startup.pl (handler.pl),
shouldn't that only get run when the handler is perl-script?

EE


 Subject: How to disable mod_perl in a subdir (apache)


 Hi all,
 I saw a posting about this subject from earlier this year.  I'm unable to
 make this work, and was hoping for some help.  I have a Location
directive
 for / (for the entire docroot).   I would like to make one subdirectory
not
 be handled by perl-script, but am unable to do so.  Excerpt from
httpd.conf:

 ~snip~
 PerlModule Apache::DBI
 PerlFreshRestart On
 PerlRequire /etc/apache/handler.pl
 Directory /var/www
 Options FollowSymLinks
 AllowOverride None
 order allow,deny
 allow from all
 /Directory

 Location /
SetHandler perl-script
PerlHandler HTML::Mason
 /Location
 ~snip~

 I'm trying to make it so that, a subdir, like /yadda-yadda, is _not_
handled
 by Mason.  Here is what I've tried to do:

 Location /yadda-yadda
 RemoveHandler .html
 /Location

 I've also tried moving the Location / directive contents into the above
 Directory, seeing as the docs mention that Location directives
override
 a Directory directive, with no luck.

 Yet these files are still being served through Mason, and I can't figure
out
 why.  Should my handler.pl (startup.pl) be moved so that it's not
executed
 in that Location?  I've read as much as I can find on Apache's site, with
no
 luck.

 Debian 2.2r3
 Apache/1.3.9
 Mod_perl 1.21

 Thanks all,
 Ethan Erchinger





RE: How to disable mod_perl in a subdir (apache)

2002-05-14 Thread Erchinger, Ethan

I have it setup that way, thanks, still no dice.


 Subject: Re: How to disable mod_perl in a subdir (apache)
 
 
 Make sure you put it after the Location directive that sets 
 HTML::Mason
 
 Location /
 SetHandler perl-script
 PerlHandler HTML::Mason
 /Location
 
 /Location /yadda-yadda
 SetHandler default-handler
 /Location
 
 
 Regards,
 
 Tim Tompkins
 --
 Programmer
 http://www.arttoday.com/
 http://www.rebelartist.com/
 --
 - Original Message -
 From: Erchinger, Ethan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 14, 2002 8:58 AM
 Subject: RE: How to disable mod_perl in a subdir (apache)
 
 
 
  Try
  Location /yadda-yadda
  SetHandler default-handler
  /Location
 
 I tried that as well.  Do you think it could be the 
 startup.pl (handler.pl),
 shouldn't that only get run when the handler is perl-script?
 
 EE
 
 
  Subject: How to disable mod_perl in a subdir (apache)
 
 
  Hi all,
  I saw a posting about this subject from earlier this year. 
  I'm unable to
  make this work, and was hoping for some help.  I have a Location
 directive
  for / (for the entire docroot).   I would like to make one 
 subdirectory
 not
  be handled by perl-script, but am unable to do so.  Excerpt from
 httpd.conf:
 
  ~snip~
  PerlModule Apache::DBI
  PerlFreshRestart On
  PerlRequire /etc/apache/handler.pl
  Directory /var/www
  Options FollowSymLinks
  AllowOverride None
  order allow,deny
  allow from all
  /Directory
 
  Location /
 SetHandler perl-script
 PerlHandler HTML::Mason
  /Location
  ~snip~
 
  I'm trying to make it so that, a subdir, like 
 /yadda-yadda, is _not_
 handled
  by Mason.  Here is what I've tried to do:
 
  Location /yadda-yadda
  RemoveHandler .html
  /Location
 
  I've also tried moving the Location / directive contents 
 into the above
  Directory, seeing as the docs mention that Location directives
 override
  a Directory directive, with no luck.
 
  Yet these files are still being served through Mason, and 
 I can't figure
 out
  why.  Should my handler.pl (startup.pl) be moved so that it's not
 executed
  in that Location?  I've read as much as I can find on 
 Apache's site, with
 no
  luck.
 
  Debian 2.2r3
  Apache/1.3.9
  Mod_perl 1.21
 
  Thanks all,
  Ethan Erchinger
 
 



RE: How to disable mod_perl in a subdir (apache)

2002-05-14 Thread Erchinger, Ethan

 
 At 08:58 AM 5/14/02 -0700, Erchinger, Ethan wrote:
 
 Do you think it could be the 
 startup.pl (handler.pl),
 shouldn't that only get run when the handler is perl-script?
 
 If you have a PerlRequire startup.pl statement in your httpd.conf, 
 startup.pl will always be run as Apache is starting up. It 
 has nothing to 
 do with the Set/AddHandler directives. I'm sure there is a 
 section in the 
 guide (http://perl.apache.org/guide/) which has more info, 
 but I don't have 
 a link handy.

Thanks.  So in the handler.pl I now have a stanza that looks for my
/yadda-yadda uri in $r, and just return 1; if that's the case, put this in
the handler() sub.  So I believe the startup.pl should no longer be causing
problems.  I find it interesting that if I comment out the Location /
directive which sets the SetHandler perl-script, then the problem
disappears, maybe no so interesting, probably more obvious.  By the way,
this directory /yadda-yadda is actually being redirected via the mod_jk
ajp13 protocol to a Tomcat server.  If that helps at all.

Thanks,
EE



Re: how to disable mod_perl in a subdir?

2002-02-28 Thread Dan Baker

the host has that commented out for some reason:
  Alias /cgi-bin/ /home/seniordiscounts/cgi-bin/
  Location /cgi-bin
SetHandler perl-script
#PerlHandler Apache::PerlRun
PerlHandler Apache::Registry
Options +ExecCGI
  /Location

please explain how PerlRun might be better?
---

Marc Slagle wrote:
 
 Maybe you can try Apache::PerlRun instead of Apache::Registry for the
 directories that you need to run those scripts.  The perldocs show how to
 set it up.
 
 Marc Slagle
 
 - Original Message -
 From: Dan Baker [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 27, 2002 11:14 PM
 Subject: how to disable mod_perl in a subdir?
 
  I am working with a host that has everything under /cgi-bin running
  mod_perl by default, and well as using EmbPerl to run the dynamic pages.
  Unfortunately, I have a set of scripts that really need regular perl,
  and I can't seem to figure out the configuration to  disable mod_perl in
  a specific directory that needs
  regular perl. ;(
 
  I tried this in the httpd.conf file:
  Directory /home/mydomain/cgi-bin/webadmin/
SetHandler default-handler
AddHandler cgi-script .pl
AllowOverride All
  /Directory
 
  and then ALSO editted a .htaccess file in
  /home/mydomain/cgi-bin/webadmin/ to include:
options +ExecCGI
RemoveHandler perl-script
SetHandler cgi-script
AddHandler cgi-script .pl
 
  and it still tries to use mod_perl?!
 
  SERVER_SOFTWARE = Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1
  OpenSSL/0.9.6 mod_perl/1.24_01
 
  PLEASE let me know if there is a way to configure so that a specific
  sub-dir uses regular perl.
 
  Dan
 



Re: how to disable mod_perl in a subdir? Directory vs Location

2002-02-28 Thread Dan Baker



Rick Myers wrote:
 
 On Feb 27, 2002 at 21:14:00 -0700, Dan Baker wrote:
 
  I am working with a host that has everything under /cgi-bin running
  mod_perl by default, and well as using EmbPerl to run the dynamic pages
 
 This begs the question, how are they doing that?
 
 I mean, if they're using Location's or File's then you're
 going to have to bend to their whim since those override
 Directory's
 
--

hhmmm, so if they have set up in httpdconf:

  Alias /cgi-bin/ /home/seniordiscounts/cgi-bin/
  Location /cgi-bin
SetHandler perl-script
#PerlHandler Apache::PerlRun
PerlHandler Apache::Registry
Options +ExecCGI
  /Location

then the non mod_perl section:

Directory /home/seniordiscounts/cgi-bin/webadmin/
  SetHandler default-handler
  AddHandler cgi-script pl
  AllowOverride All
/Directory 

will be overidden? I guess then I should add an alias line and switch to
using Location ?

Dan



Re: how to disable mod_perl in a subdir? Directory vs Location

2002-02-28 Thread Rick Myers

On Feb 28, 2002 at 05:54:07 -0700, Dan Baker wrote:
 
 Rick Myers wrote:
  
  On Feb 27, 2002 at 21:14:00 -0700, Dan Baker wrote:
  
   I am working with a host that has everything under /cgi-bin running
   mod_perl by default, and well as using EmbPerl to run the dynamic pages
  
  This begs the question, how are they doing that?
  
  I mean, if they're using Location's or File's then you're
  going to have to bend to their whim since those override
  Directory's
  
 --
 
 hhmmm, so if they have set up in httpdconf:
 
   Alias /cgi-bin/ /home/seniordiscounts/cgi-bin/
   Location /cgi-bin
 SetHandler perl-script
 #PerlHandler Apache::PerlRun
 PerlHandler Apache::Registry
 Options +ExecCGI
   /Location
 
 then the non mod_perl section:
 
 Directory /home/seniordiscounts/cgi-bin/webadmin/
   SetHandler default-handler
   AddHandler cgi-script pl
   AllowOverride All
 /Directory 
 
 will be overidden?

Right At least that's how I read the relevant doc

   http://httpdapacheorg/docs/sectionshtml

 I guess then I should add an alias line and switch to
 using Location ?

That would work, but see the above doc Location's are
processed in the order they appear in the conf file

--rick




how to disable mod_perl in a subdir?

2002-02-27 Thread Dan Baker

I am working with a host that has everything under /cgi-bin running
mod_perl by default, and well as using EmbPerl to run the dynamic pages.
Unfortunately, I have a set of scripts that really need regular perl,
and I can't seem to figure out the configuration to  disable mod_perl in
a specific directory that needs
regular perl. ;( 

I tried this in the httpd.conf file:
Directory /home/mydomain/cgi-bin/webadmin/
  SetHandler default-handler
  AddHandler cgi-script .pl
  AllowOverride All
/Directory 

and then ALSO editted a .htaccess file in
/home/mydomain/cgi-bin/webadmin/ to include:
  options +ExecCGI
  RemoveHandler perl-script
  SetHandler cgi-script 
  AddHandler cgi-script .pl

and it still tries to use mod_perl?!

SERVER_SOFTWARE = Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1
OpenSSL/0.9.6 mod_perl/1.24_01 

PLEASE let me know if there is a way to configure so that a specific
sub-dir uses regular perl.

Dan



Re: how to disable mod_perl in a subdir?

2002-02-27 Thread Marc Slagle

Maybe you can try Apache::PerlRun instead of Apache::Registry for the
directories that you need to run those scripts.  The perldocs show how to
set it up.

Marc Slagle

- Original Message -
From: Dan Baker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 11:14 PM
Subject: how to disable mod_perl in a subdir?


 I am working with a host that has everything under /cgi-bin running
 mod_perl by default, and well as using EmbPerl to run the dynamic pages.
 Unfortunately, I have a set of scripts that really need regular perl,
 and I can't seem to figure out the configuration to  disable mod_perl in
 a specific directory that needs
 regular perl. ;(

 I tried this in the httpd.conf file:
 Directory /home/mydomain/cgi-bin/webadmin/
   SetHandler default-handler
   AddHandler cgi-script .pl
   AllowOverride All
 /Directory

 and then ALSO editted a .htaccess file in
 /home/mydomain/cgi-bin/webadmin/ to include:
   options +ExecCGI
   RemoveHandler perl-script
   SetHandler cgi-script
   AddHandler cgi-script .pl

 and it still tries to use mod_perl?!

 SERVER_SOFTWARE = Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1
 OpenSSL/0.9.6 mod_perl/1.24_01

 PLEASE let me know if there is a way to configure so that a specific
 sub-dir uses regular perl.

 Dan