ProxyRewrite configuration

2002-10-02 Thread rodneyr

The problem was solved when I set the Apache Servername parameter to the IP
address of the Proxy Server.

But I don't understand why the ProxyRewrite module doen't change the URL to
what we want. It changes it only to "/".

Thanks,

---

Rodney A. Ramos






RODNEY ANTONIO RAMOS RODNEYR
27/09/2002 14:31

Para:  [EMAIL PROTECTED]
cc:

Assunto:ProxyRewrite configuration


I'm having problem with the ProxyRewrite configuration. My enviroment is:

Internal Site: http://a.a.a.a/site
External Site (The proxy server): http://b.b.b.b/site

I'd like to configure a Reverse Proxy so that all resquests to
http://b.b.b.b/site would be redirected to  http://a.a.a.a/site.

So first I tried the Apache module mod_proxy with the configuration at the
httpd.conf.

---

ProxyRequests Off

ProxyPass /site http://a.a.a.a/site
ProxyPassReverse /site http://b.b.b.b/site


Everything worked fine. But the problem was with the embedded URLs. The  mod_proxy 
doen't change them.

So that's why I'm trying to use the ProxyRewrite module.

I put the following lines at the end of the httpd.conf:




  SetHandler   perl-script
  PerlHandler  Apache::ProxyRewrite
  PerlSetVar   ProxyTo   http://a.a.a.a/site
  PerlSetVar   ProxyAuthInfo "BASIC aGb2c3ewenQ6amF4szzmY3b="
  PerlSetVar   ProxyAuthRedirect Off
  PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => /"

--

What I see is that all the embedded URLs that begin with "http://a.a.a.a/"; are changed 
to "/".

So the links works well but  the redirects that I have in my CGI scripts doesn't work. 
The server don't find the page.

Exemple of redirect on my CGI scripts written with perl:

  print redirect("http://a.a.a.a/site/cgi-bin/.cgi";);

As I don't have a DNS, I tried to change the line:

PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => /"

To:

PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => http://b.b.b.b/";

But the embedded URLs are still changed to "/". I can't understand.

Can anyone help me? I'd be very grateful.

I think that my problem is very simple. I'd like to configure a Reverse Proxy that 
changes the embedded URLs too, not only the Location URL.

Thank you very much.

---
Rodney A. Ramos








RE: ProxyRewrite configuration

2002-09-27 Thread rodneyr

I've already tried without the domain name/IP and I didn't have success.

I don't use domain name/IP on my scripts. I did it only on the scripts that
I want to redirect with the reverse proxy, as I was having problems whith
the embedded URLs.

Thanks for yuor help.
---

Rodney A. Ramos





"Adam Nelson" <[EMAIL PROTECTED]> em 27/09/2002 15:06:02

Para:  <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
cc:

Assunto:RE: ProxyRewrite configuration


This seems to be more of a general apache thing.  I try never to use the
domain name/IP anywhere that isn't totally necessary.  So, instead of:

print redirect("http://a.a.a.a/site/cgi-bin/.cgi";);

Why not:

print redirect("/site/cgi-bin/.cgi");

This way, there is no need to hardcode the domain/IP information

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 1:32 PM
To: [EMAIL PROTECTED]
Subject: ProxyRewrite configuration



I'm having problem with the ProxyRewrite configuration. My enviroment
is:

Internal Site: http://a.a.a.a/site
External Site (The proxy server): http://b.b.b.b/site

I'd like to configure a Reverse Proxy so that all resquests to
http://b.b.b.b/site would be redirected to  http://a.a.a.a/site.

So first I tried the Apache module mod_proxy with the configuration at
the
httpd.conf.

---

ProxyRequests Off

ProxyPass /site http://a.a.a.a/site
ProxyPassReverse /site http://b.b.b.b/site


Everything worked fine. But the problem was with the embedded URLs. The
mod_proxy doen't change them.

So that's why I'm trying to use the ProxyRewrite module.

I put the following lines at the end of the httpd.conf:




  SetHandler   perl-script
  PerlHandler  Apache::ProxyRewrite
  PerlSetVar   ProxyTo   http://a.a.a.a/site
  PerlSetVar   ProxyAuthInfo "BASIC aGb2c3ewenQ6amF4szzmY3b="
  PerlSetVar   ProxyAuthRedirect Off
  PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => /"

--

What I see is that all the embedded URLs that begin with
"http://a.a.a.a/"; are changed to "/".

So the links works well but  the redirects that I have in my CGI scripts
doesn't work. The server don't find the page.

Exemple of redirect on my CGI scripts written with perl:

  print redirect("http://a.a.a.a/site/cgi-bin/.cgi";);

As I don't have a DNS, I tried to change the line:

PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => /"

To:

PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => http://b.b.b.b/";

But the embedded URLs are still changed to "/". I can't understand.

Can anyone help me? I'd be very grateful.

I think that my problem is very simple. I'd like to configure a Reverse
Proxy that changes the embedded URLs too, not only the Location URL.

Thank you very much.


---
Rodney A. Ramos
















ProxyRewrite configuration

2002-09-27 Thread rodneyr


I'm having problem with the ProxyRewrite configuration. My enviroment is:

Internal Site: http://a.a.a.a/site
External Site (The proxy server): http://b.b.b.b/site

I'd like to configure a Reverse Proxy so that all resquests to
http://b.b.b.b/site would be redirected to  http://a.a.a.a/site.

So first I tried the Apache module mod_proxy with the configuration at the
httpd.conf.

---

ProxyRequests Off

ProxyPass /site http://a.a.a.a/site
ProxyPassReverse /site http://b.b.b.b/site


Everything worked fine. But the problem was with the embedded URLs. The  mod_proxy 
doen't change them.

So that's why I'm trying to use the ProxyRewrite module.

I put the following lines at the end of the httpd.conf:




  SetHandler   perl-script
  PerlHandler  Apache::ProxyRewrite
  PerlSetVar   ProxyTo   http://a.a.a.a/site
  PerlSetVar   ProxyAuthInfo "BASIC aGb2c3ewenQ6amF4szzmY3b="
  PerlSetVar   ProxyAuthRedirect Off
  PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => /"

--

What I see is that all the embedded URLs that begin with "http://a.a.a.a/"; are changed 
to "/".

So the links works well but  the redirects that I have in my CGI scripts doesn't work. 
The server don't find the page.

Exemple of redirect on my CGI scripts written with perl:

  print redirect("http://a.a.a.a/site/cgi-bin/.cgi";);

As I don't have a DNS, I tried to change the line:

PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => /"

To:

PerlSetVar   ProxyRewrite  "http://a.a.a.a/ => http://b.b.b.b/";

But the embedded URLs are still changed to "/". I can't understand.

Can anyone help me? I'd be very grateful.

I think that my problem is very simple. I'd like to configure a Reverse Proxy that 
changes the embedded URLs too, not only the Location URL.

Thank you very much.

---
Rodney A. Ramos