Re: mod_perl on specific scripts (fwd)

2000-11-06 Thread Matthew Byng-Maddick

n 6 Nov 2000, David Hodgkinson wrote:
 Matthew Byng-Maddick [EMAIL PROTECTED] writes:
  On 1 Nov 2000, David Hodgkinson wrote:
   Matthew Byng-Maddick [EMAIL PROTECTED] writes:
You do, of course, know about all the latest patches for this, due to
potential security problems
   ...moving to Apache 1.3.14, right?
  Some are fixed in 1.3.14 but there are an extra set of patches for 1.3.14
  to fix the things that weren't fixed.
 And where do these hide? I can't see them on apache.org in either
 patches directory...

Tony Finch wrote:
| I have also made the patch available from
| http://httpd.apache.org/dist/apache_1.3.14-fix.diff
| because there are a few other problems we want to fix before releasing
| 1.3.15 and getting the patch out of the bug database is unnecessarily
| painful.

From when I spoke to Tony, he said that these were mod_rewrite isssues
too.

MBM

-- 
Matthew Byng-Maddick   Home: [EMAIL PROTECTED]  +44 20  8981 8633  (Home)
http://colondot.net/   Work: [EMAIL PROTECTED] +44 7956 613942  (Mobile)
The  Universe  shipped by  weight, not by  volume.  Some  expansion of the
contents may have occurred during shipment.





Re: mod_perl on specific scripts

2000-11-01 Thread Christopher L. Everett

David Hodgkinson wrote:
 
 Paonia Ezrine [EMAIL PROTECTED] writes:
 
  I have a number of scripts in places other then /perl that I want to use
  mod_perl for.  However, I can't turn it on for all scripts in a specific
  directory or even a certain extension.  Is there any way to do this or am
  I going to need to do a redirect of some sort (anyone have one)?
 
 I trust you've set up a thin apache at the front? Then it's easy to
 pass only the scripts you want back to the mod_perl server.
 
 Did I just condemn you to learning mod_rewrite? Ooops :-)

Assuming your script is written as a mod_perl handler, and assuming
the aforesaid thin Apache in front, try mod_proxy on the front end
and Location on the back end.  What I do in my httpd-static.conf 
(cribbed wholesale from the Guide, names changed to protect the 
innocent):

VirtualHost www.xxx.yyy.zzz:ppp
  ServerName www.foo.com

  ProxyRequests on
  ProxyPass/cgi-bin/  http://localhost:8080/bar/baz/
  ProxyPassReverse /cgi-bin/  http://localhost:8080/bar/baz/
  RewriteRule ^proxy:.* - [F]   # keep others from using your proxy
  ProxyReceiveBufferSize 65536  # buffer more data thru the proxy
# put whatever else you need in here too, like SSL configs, root dirs,
# and whatnot
/VirtualHost  

and in the httpd-perl.conf:

Location /boo/baz/noot.cgi
  SetHandler perl-script
  PerlHandler Knights::who::say::Nit
# likely more stuff goes in here too, see the Guide for details
/Location

If your scripts are of type Apache::Registry, instead do 

Alias /bar/baz/ /your/special/path/to/your/scripts/
Location /bar/baz/
  SetHandler perl-script
  PerlHandler +Apache::Registry
  Options ExecCGI
  PerlSendHeader On
/Location

META 
Would something like

Alias /bar/baz/foo.cgi /your/special/path/to/foo.cgi

work?  Because then this will work:

Location /bar/baz/foo.cgi
  SetHandler perl-script
  PerlHandler +Apache::Registry
  Options ExecCGI
  PerlSendHeader On
/Location

and we can mix PerlHandlers and Apache::Registry scripts in
the same (virtual) direactory.  That would be a win.
/META

At least this handles the directory problem.  The file extension 
problem really does require mod_rewrite, I believe.

The beauty of this is that what the client sees really has nothing
to do with where the scripts are on your server.  On my box, I used
mod_proxy to virtualize the /cgi-bin/ directory.  When a request 
comes in for http://www.foo.com/cgi-bin/noot.cgi, the request gets 
passed back, the proper PerlHandler gets called, and life goes on.

I admit that I've deliberately avoided learning mod_rewrite; I took 
one look at it and said "I'm doing something else!".  So I set up 
all my sites to avoid using it.  God help me if I ever really _have_ 
to use it, though :)
 
  --Christopher

Christopher L. Everett
[EMAIL PROTECTED]



Re: mod_perl on specific scripts

2000-11-01 Thread David Hodgkinson

Matthew Byng-Maddick [EMAIL PROTECTED] writes:

 On 31 Oct 2000, David Hodgkinson wrote:
  Did I just condemn you to learning mod_rewrite? Ooops :-)
 
 You do, of course, know about all the latest patches for this, due to
 potential security problems

...moving to Apache 1.3.14, right?

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



Re: mod_perl on specific scripts

2000-11-01 Thread Matthew Byng-Maddick

On 1 Nov 2000, David Hodgkinson wrote:
 Matthew Byng-Maddick [EMAIL PROTECTED] writes:
  On 31 Oct 2000, David Hodgkinson wrote:
   Did I just condemn you to learning mod_rewrite? Ooops :-)
  You do, of course, know about all the latest patches for this, due to
  potential security problems
 ...moving to Apache 1.3.14, right?

Some are fixed in 1.3.14 but there are an extra set of patches for 1.3.14
to fix the things that weren't fixed.

MBM

-- 
Matthew Byng-Maddick   Home: [EMAIL PROTECTED]  +44 20  8981 8633  (Home)
http://colondot.net/   Work: [EMAIL PROTECTED] +44 7956 613942  (Mobile)
To err is human, to forgive is against company policy.




mod_perl on specific scripts

2000-10-31 Thread Paonia Ezrine

I have a number of scripts in places other then /perl that I want to use
mod_perl for.  However, I can't turn it on for all scripts in a specific
directory or even a certain extension.  Is there any way to do this or am
I going to need to do a redirect of some sort (anyone have one)?

Thanks,
Paonia




Re: mod_perl on specific scripts

2000-10-31 Thread Bill Moseley

At 03:31 PM 10/31/00 -0500, Paonia Ezrine wrote:
I have a number of scripts in places other then /perl that I want to use
mod_perl for.  However, I can't turn it on for all scripts in a specific
directory or even a certain extension.  Is there any way to do this or am
I going to need to do a redirect of some sort (anyone have one)?

How about the files directive.


Bill Moseley
mailto:[EMAIL PROTECTED]



Re: mod_perl on specific scripts

2000-10-31 Thread Paonia Ezrine

 At 03:31 PM 10/31/00 -0500, Paonia Ezrine wrote:
 I have a number of scripts in places other then /perl that I want to use
 mod_perl for.  However, I can't turn it on for all scripts in a specific
 directory or even a certain extension.  Is there any way to do this or am
 I going to need to do a redirect of some sort (anyone have one)?
 
 How about the files directive.
 
 
 Bill Moseley
 mailto:[EMAIL PROTECTED]
 

Bill,
this is good in thoery but I have not gotten it to work in practice.

here is the general idea (of what I tried):
Files /home/httpd/cgi-bin/test2.pl
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSetEnv PERL5LIB /usr/lib/perl5/site_perl/5.6.0
/Files
 
I tried a lot of variation as well
thanks
Paonia




Re: mod_perl on specific scripts

2000-10-31 Thread Matthew Byng-Maddick

On 31 Oct 2000, David Hodgkinson wrote:
 Did I just condemn you to learning mod_rewrite? Ooops :-)

You do, of course, know about all the latest patches for this, due to
potential security problems

MBM

-- 
Matthew Byng-Maddick   Home: [EMAIL PROTECTED]  +44 20  8981 8633  (Home)
http://colondot.net/   Work: [EMAIL PROTECTED] +44 7956 613942  (Mobile)
To err is human, to forgive is against company policy.




Re: mod_perl on specific scripts

2000-10-31 Thread Bill Moseley

At 08:00 PM 10/31/00 -0500, Paonia Ezrine wrote:
Bill,
this is good in thoery but I have not gotten it to work in practice.

here is the general idea (of what I tried):
Files /home/httpd/cgi-bin/test2.pl

Files test2.pl

And you can use it within a Directory to limit its reach.

http://httpd.apache.org/docs/mod/core.html#files



Bill Moseley
mailto:[EMAIL PROTECTED]



Re: mod_perl on specific scripts

2000-10-31 Thread David Hodgkinson

Paonia Ezrine [EMAIL PROTECTED] writes:

 I have a number of scripts in places other then /perl that I want to use
 mod_perl for.  However, I can't turn it on for all scripts in a specific
 directory or even a certain extension.  Is there any way to do this or am
 I going to need to do a redirect of some sort (anyone have one)?

I trust you've set up a thin apache at the front? Then it's easy to
pass only the scripts you want back to the mod_perl server.

Did I just condemn you to learning mod_rewrite? Ooops :-)

Plan B would be to maybe do it by suffix? Can you do that?

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -