Re: Problem combining mod_proxy, mod_rewrite & mod_perl

2003-01-10 Thread Stas Bekman
Jan P. Monsch wrote:

G'day!

I would like to combine mod_proxy, mod_rewrite and mod_perl on an Apache 
2.0.43 for Windows with mod_perl 2.0. The Perl Version I use is 
ActiveState 5.6.1.

Just by loading the module the server behaves differently. Instead 
seeing the the reverse proxied site I get following error in the browser:

-
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET 
/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/. 


Reason: Max-Forwards has reached zero - proxy loop?
-

It seems as if the rewrite rules are applied in a recursive loop. The 
rewrite.log does support this.

Any ideas why this is happening and how can I get the config running again.
[...]

From your explanations and debug traces it looks like a bug in 
mod_proxy/mod_rewrite. You probably will get the same story with 
mod_cgi. If so, you need to report this bug to the httpd-dev list.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Problem combining mod_proxy, mod_rewrite & mod_perl

2003-01-10 Thread Jan P. Monsch
G'day!

I would like to combine mod_proxy, mod_rewrite and mod_perl on an Apache 
2.0.43 for Windows with mod_perl 2.0. The Perl Version I use is 
ActiveState 5.6.1.

Just by loading the module the server behaves differently. Instead 
seeing the the reverse proxied site I get following error in the browser:

-
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET 
/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/directx1/.

Reason: Max-Forwards has reached zero - proxy loop?
-

It seems as if the rewrite rules are applied in a recursive loop. The 
rewrite.log does support this.

Any ideas why this is happening and how can I get the config running again.

Regards Jan



--
The rewrite log does look like this:
sid#4ade80][rid#484888/initial] (2) init rewrite engine with requested uri /
sid#4ade80][rid#484888/initial] (3) applying pattern '^/(.*)' to uri '/'
sid#4ade80][rid#484888/initial] (2) rewrite / -> /directx/
sid#4ade80][rid#484888/initial] (2) forcing proxy-throughput with 
http://192.168.X.X/directx/
sid#4ade80][rid#484888/initial] (1) go-ahead with proxy request 
proxy:http://192.168.X.X/directx/ [OK]
sid#4ade80][rid#48a8a0/initial] (2) init rewrite engine with requested 
uri /directx/
sid#4ade80][rid#48a8a0/initial] (3) applying pattern '^/(.*)' to uri 
'/directx/'
sid#4ade80][rid#48a8a0/initial] (2) rewrite /directx/ -> /directx/directx/
sid#4ade80][rid#48a8a0/initial] (2) forcing proxy-throughput with 
http://192.168.X.X/directx/directx/
sid#4ade80][rid#48a8a0/initial] (1) go-ahead with proxy request 
proxy:http://192.168.X.X/directx/directx/ [OK]
... { Shortend }


-
I have following httpd.conf (shortend):
LoadFile "C:/Perl/bin/perl56.dll"

LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule perl_module modules/mod_perl.so


	ServerName  foo.bar
	DocumentRoot	/htdocs_rp
	
	RewriteEngine	On
	RewriteLog	logs/rewrite.log
	RewriteLogLevel	9

	RewriteRule	^/inject$	/tap1/inject.html [P]
	RewriteRule	^/(.*)	/directx1/$1 [P]

	ProxyPass	/tap1/		http://127.0.0.1/
	ProxyPassReverse	/	http://127.0.0.1/

	ProxyPass	/directx1/	http://acm.org/
	ProxyPassReverse	/	http://acm.org/




Re: mod_rewrite + mod_perl

2001-09-10 Thread Vivek Khera

> "KS" == Kenny Smith <[EMAIL PROTECTED]> writes:

KS> It executes show_journal.mod_perl perfectly well, but the script does not
KS> remain resident in memory. Do I need to call it differently? Any help is
KS> appreciated. :)

What evidence do you have to say it doesn't remain resident?


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



mod_rewrite + mod_perl

2001-09-09 Thread Kenny Smith

Hello all,

For the first part of my project, I'm just using mod_perl as a replacement
for CGI. I'm trying to execute a mod_perl script via mod_rewrite, but it
doesn't seem to be persisting.

In my httpd.conf, I've got:

  
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options ExecCGI
  

...

RewriteRule ^/([^/^.]+)/?$ /path/show_journal.mod_perl
 [T=application/x-httpd-cgi,E=NICKNAME:$1,L]

The above is used to catch the following URL:

http://www.journalscape.com/kenny/

The nickname 'kenny' is captured from the url and sent to the script via an
environment variable.

It executes show_journal.mod_perl perfectly well, but the script does not
remain resident in memory. Do I need to call it differently? Any help is
appreciated. :)

Kenny Smith
[EMAIL PROTECTED]