Is ProxyPass the best you can do?

2001-06-16 Thread Philip Mak

I've been thinking about the ProxyPass technique for coping with
mod_perl's high memory usage (setup a non-mod_perl httpd that handles all
requests, but ProxyPasses the mod_perl calls to a mod_perl enabled
Apache).

I find that the complexity of this method is more than it should have to
be. For one thing, ProxyPass only works on a directory. But if you have
images and scripts in the same directory, this is a problem (and it's
convenient to be able to have them in the same directory, so that your
scripts can a href=image.jpg instead of a href=/images/image.jpg
especially when you have a lot of images in different directories).

Is there a way to ProxyPass by file extension or something?

-Philip Mak ([EMAIL PROTECTED])




Re: Is ProxyPass the best you can do?

2001-06-16 Thread Martin Redington


Squid is the alternative mentioned in the mod_perl_tuning.pod that comes 
with mod_perl.

Alternatively, you could try using mod_rewrite, to direct requests for 
scripts to a different apache instance (e.g. running on a separate port 
or ip). I've never tried this, but it should work.

Squid might be more efficient.

 cheers,
 Martin


On Sunday, June 17, 2001, at 03:43  am, Philip Mak wrote:

 I've been thinking about the ProxyPass technique for coping with
 mod_perl's high memory usage (setup a non-mod_perl httpd that handles 
 all
 requests, but ProxyPasses the mod_perl calls to a mod_perl enabled
 Apache).

 I find that the complexity of this method is more than it should have to
 be. For one thing, ProxyPass only works on a directory. But if you have
 images and scripts in the same directory, this is a problem (and it's
 convenient to be able to have them in the same directory, so that your
 scripts can a href=image.jpg instead of a href=/images/image.jpg
 especially when you have a lot of images in different directories).

 Is there a way to ProxyPass by file extension or something?

 -Philip Mak ([EMAIL PROTECTED])





Re: Is ProxyPass the best you can do?

2001-06-16 Thread Philip Mak

On Sun, 17 Jun 2001, Martin Redington wrote:

 Squid is the alternative mentioned in the mod_perl_tuning.pod that comes
 with mod_perl.

Can Squid read Apache configuration files? On a new site I'm making
(www.shoujoai.com), I have directives in httpd.conf like this:

RewriteRule ^/fanfics/([a-zA-Z_0-9\-]+)/$ /fanfics/series.asp?series=$1

so that viewing http://www.shoujoai.com/fanfics/*/ actually calls an
Apache::ASP script. But, only by reading the httpd.conf would one be able
to tell that it's a script instead of a normal directory.

 Alternatively, you could try using mod_rewrite, to direct requests for
 scripts to a different apache instance (e.g. running on a separate port
 or ip). I've never tried this, but it should work.

You can use RewriteRule to make it proxy the request to another Apache? I
thought you can only alias a URL to a file, or make it send an HTTP
redirect. How do you make it proxy?

-Philip Mak ([EMAIL PROTECTED])




Re: Is ProxyPass the best you can do?

2001-06-16 Thread Mike Christine


- Original Message -
From: Philip Mak [EMAIL PROTECTED]
To: modperl [EMAIL PROTECTED]
Sent: Saturday, June 16, 2001 9:31 PM
Subject: Re: Is ProxyPass the best you can do?


 On Sun, 17 Jun 2001, Martin Redington wrote:

  Squid is the alternative mentioned in the mod_perl_tuning.pod that comes
  with mod_perl.

 Can Squid read Apache configuration files? On a new site I'm making
 (www.shoujoai.com), I have directives in httpd.conf like this:

 RewriteRule ^/fanfics/([a-zA-Z_0-9\-]+)/$ /fanfics/series.asp?series=$1

 so that viewing http://www.shoujoai.com/fanfics/*/ actually calls an
 Apache::ASP script. But, only by reading the httpd.conf would one be able
 to tell that it's a script instead of a normal directory.

  Alternatively, you could try using mod_rewrite, to direct requests for
  scripts to a different apache instance (e.g. running on a separate port
  or ip). I've never tried this, but it should work.

 You can use RewriteRule to make it proxy the request to another Apache? I
 thought you can only alias a URL to a file, or make it send an HTTP
 redirect. How do you make it proxy?

This is what you are looking for i think

http://thingy.kcilink.com/modperlguide/scenario/mod_rewrite_Examples.html

 -Philip Mak ([EMAIL PROTECTED])





Re: Is ProxyPass the best you can do?

2001-06-16 Thread Martin Redington

 Can Squid read Apache configuration files? On a new site I'm making
 (www.shoujoai.com), I have directives in httpd.conf like this:

Never used it, I'm afraid ...

 Alternatively, you could try using mod_rewrite, to direct requests for
 scripts to a different apache instance (e.g. running on a separate port
 or ip). I've never tried this, but it should work.

 You can use RewriteRule to make it proxy the request to another 
 Apache? I
 thought you can only alias a URL to a file, or make it send an HTTP
 redirect. How do you make it proxy?

Ah. I was assuming that redirects would be ok (it would be in my 
environment) ...