Proxying the protocol...

Proxying the protocol...

am 09.05.2003 18:43:30 von Matt Gregory

This is a multi-part message in MIME format.

------=_NextPart_000_0050_01C31628.986F26B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hey all. I have been researching and experimenting with this and have
not yet found a way to do it with either mod_rewrite or mod_proxy.

I have about 25 virtual hosts all with their own ssl keys. I want to
proxy them all through apache to JBoss and then have JBoss proxy content
from Zope.

The problem I am having is that I have a portlet-streamer tool which I
wrote and open-sourced which will rewrite the content links from zope
according to a configuration file which works very similar to
mod_rewrite (which I used as a guide). I have no problems except when I
try to determine what the original protocol was.

When using mod_proxy, I can use apache 2.0 and use the ProxyPreserveHost
directive to get the host from the request, or I can simply pull it from
the x-forward-host header property using my rewrite tool. Unfortunately
nothing in the request or the header tells me if the request was via
http or via https.

Is there any way to tell the target host the original protocol via a
header variable or a directive?

------=_NextPart_000_0050_01C31628.986F26B0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">











style=3D'tab-interval:.5in'>



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>H
face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>ey all. style=3D'mso-spacerun:yes'>  I have been researching and
experimenting with this and have not yet found a way to do it with =
either
mod_rewrite or mod_proxy.



style=3D'font-size:10.0pt;
font-family:Arial'> 



style=3D'font-size:10.0pt;
font-family:Arial'>I have about 25 virtual hosts all with their own ssl
keys.  I want to proxy them =
all
through apache to JBoss and then have JBoss proxy content from =
Zope.



style=3D'font-size:10.0pt;
font-family:Arial'> 



style=3D'font-size:10.0pt;
font-family:Arial'>The problem I am having is that I have a =
portlet-streamer
tool which I wrote and open-sourced which will rewrite the content links =
from
zope according to a configuration file which works very similar to =
mod_rewrite
(which I used as a guide).  =
I have
no problems except when I try to determine what the original protocol =
was.



style=3D'font-size:10.0pt;
font-family:Arial'> 



style=3D'font-size:10.0pt;
font-family:Arial'>When using mod_proxy, I can use apache 2.0 and use =
the
ProxyPreserveHost directive to get the host from the request, or I can =
simply
pull it from the x-forward-host header property using my rewrite =
tool. style=3D'mso-spacerun:yes'> 
Unfortunately nothing in the =
request or
the header tells me if the request was via http or via =
https.



style=3D'font-size:10.0pt;
font-family:Arial'> 



style=3D'font-size:10.0pt;
font-family:Arial'>Is there any way to tell the target host the original
protocol via a header variable or a =
directive?









------=_NextPart_000_0050_01C31628.986F26B0--

Re: Proxying the protocol...

am 11.05.2003 12:35:26 von Daniel Lopez

> When using mod_proxy, I can use apache 2.0 and use the ProxyPreserveHost
> directive to get the host from the request, or I can simply pull it from
> the x-forward-host header property using my rewrite tool. Unfortunately
> nothing in the request or the header tells me if the request was via
> http or via https.
>
> Is there any way to tell the target host the original protocol via a
> header variable or a directive?

In Apache 2, you can set a header in the request with any environment
variable (see RequestHeader directive). Enable SSL environment variables,
then add a header with the HTTPS variable, which will tell you if the
request is secure or not. other variables you may be interested on:

http://www.modssl.org/docs/2.8/ssl_reference.html#ToC25

Cheers

Daniel

--
Teach Yourself Apache 2 -- http://apacheworld.org/ty24/

RE: Proxying the protocol...

am 12.05.2003 15:56:06 von Juan Rivera

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3188E.3298A5C0
Content-Type: text/plain

Why don't you add your own custom header to the request?

-----Original Message-----
From: Matt Gregory [mailto:matt.gregory@skyleach.com]
Sent: Friday, May 09, 2003 12:44 PM
To: modproxy-dev@apache.org
Subject: Proxying the protocol...

Hey all. I have been researching and experimenting with this and have not
yet found a way to do it with either mod_rewrite or mod_proxy.

I have about 25 virtual hosts all with their own ssl keys. I want to proxy
them all through apache to JBoss and then have JBoss proxy content from
Zope.

The problem I am having is that I have a portlet-streamer tool which I wrote
and open-sourced which will rewrite the content links from zope according to
a configuration file which works very similar to mod_rewrite (which I used
as a guide). I have no problems except when I try to determine what the
original protocol was.

When using mod_proxy, I can use apache 2.0 and use the ProxyPreserveHost
directive to get the host from the request, or I can simply pull it from the
x-forward-host header property using my rewrite tool. Unfortunately nothing
in the request or the header tells me if the request was via http or via
https.

Is there any way to tell the target host the original protocol via a header
variable or a directive?

------_=_NextPart_001_01C3188E.3298A5C0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">











style=3D'tab-interval:.5in'>



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Why don't you add your own custom
header to the request?



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 

=


face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----

From: Matt Gregory
[mailto:matt.gregory@skyleach.com]

Sent: Friday, May 09, =
2003 12:44
PM

To: =
modproxy-dev@apache.org

Subject: Proxying the =
protocol...



face=3D"Times New Roman"> style=3D'font-size:12.0pt'> 



color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'>H<=
font
size=3D2 face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>ey all. style=3D'mso-spacerun:yes'>  I have been researching and =
experimenting
with this and have not yet found a way to do it with either mod_rewrite =
or
mod_proxy.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  ont>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>I have about 25 virtual =
hosts all
with their own ssl keys.  =
I want to proxy
them all through apache to JBoss and then have JBoss proxy content from =
Zope.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  ont>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>The problem I am having is =
that I
have a portlet-streamer tool which I wrote and open-sourced which will =
rewrite
the content links from zope according to a configuration file which =
works very
similar to mod_rewrite (which I used as a guide). style=3D'mso-spacerun:yes'>  I have no problems except when =
I try to
determine what the original protocol was.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  ont>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>When using mod_proxy, I =
can use
apache 2.0 and use the ProxyPreserveHost directive to get the host from =
the
request, or I can simply pull it from the x-forward-host header =
property using
my rewrite tool.  =
Unfortunately nothing
in the request or the header tells me if the request was via http or =
via https.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  ont>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>Is there any way to tell =
the target
host the original protocol via a header variable or a =
directive?









------_=_NextPart_001_01C3188E.3298A5C0--

RE: Proxying the protocol...

am 12.05.2003 21:51:23 von Matt Gregory

This is a multi-part message in MIME format.

------=_NextPart_000_0139_01C3189E.56F14E20
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Because I don't know how. I haven't found a way to add custom header
variables via mod_rewrite or mod_proxy. Is there another apache module
that will do this?

-----Original Message-----
From: Juan Rivera [mailto:Juan.Rivera@citrix.com]
Sent: Monday, May 12, 2003 9:56 AM
To: 'modproxy-dev@apache.org'
Subject: RE: Proxying the protocol...

Why don't you add your own custom header to the request?

-----Original Message-----
From: Matt Gregory [mailto:matt.gregory@skyleach.com]
Sent: Friday, May 09, 2003 12:44 PM
To: modproxy-dev@apache.org
Subject: Proxying the protocol...

Hey all. I have been researching and experimenting with this and have
not yet found a way to do it with either mod_rewrite or mod_proxy.

I have about 25 virtual hosts all with their own ssl keys. I want to
proxy them all through apache to JBoss and then have JBoss proxy content
from Zope.

The problem I am having is that I have a portlet-streamer tool which I
wrote and open-sourced which will rewrite the content links from zope
according to a configuration file which works very similar to
mod_rewrite (which I used as a guide). I have no problems except when I
try to determine what the original protocol was.

When using mod_proxy, I can use apache 2.0 and use the ProxyPreserveHost
directive to get the host from the request, or I can simply pull it from
the x-forward-host header property using my rewrite tool. Unfortunately
nothing in the request or the header tells me if the request was via
http or via https.

Is there any way to tell the target host the original protocol via a
header variable or a directive?

------=_NextPart_000_0139_01C3189E.56F14E20
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">











style=3D'tab-interval:.5in'>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Beca use I =
don’t
know how.
face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'> style=3D'mso-spacerun:yes'>  I haven’t found a way to =
add custom
header variables via mod_rewrite or class=3DSpellE>mod_proxy.  =
Is there
another apache module that will do this?



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----

From: Juan Rivera
[mailto:Juan.Rivera@citrix.com]

Sent: Monday, May 12, =
2003 9:56 AM

To: =
'modproxy-dev@apache.org'

Subject: RE: Proxying the
protocol...



face=3D"Times New Roman"> style=3D'font-size:12.0pt'> 



color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Why don't you =
add your
own custom header to the request?



color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'> =



face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----

From: Matt Gregory
[mailto:matt.gregory@skyleach.com]

Sent: Friday, May 09, =
2003 12:44
PM

To: =
modproxy-dev@apache.org

Subject: Proxying the =
protocol...



face=3D"Times New Roman"> style=3D'font-size:12.0pt'> 



color=3Dnavy
face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'>H
ont
size=3D2 face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>ey all. style=3D'mso-spacerun:yes'>  I have been researching and =
experimenting
with this and have not yet found a way to do it with either mod_rewrite =
or
mod_proxy.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>I have about 25 virtual =
hosts all
with their own ssl keys.  I =
want to proxy
them all through apache to JBoss and then have JBoss proxy content from =
Zope.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>The problem I am having is =
that I
have a portlet-streamer tool which I wrote and open-sourced which will =
rewrite
the content links from zope according to a configuration file which =
works very
similar to mod_rewrite (which I used as a guide). style=3D'mso-spacerun:yes'>  I have no problems except when =
I try to
determine what the original protocol was.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>When using mod_proxy, I can =
use
apache 2.0 and use the ProxyPreserveHost directive to get the host from =
the
request, or I can simply pull it from the x-forward-host header property =
using
my rewrite tool.  =
Unfortunately nothing
in the request or the header tells me if the request was via http or via =
https.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>Is there any way to tell =
the target
host the original protocol via a header variable or a =
directive?









------=_NextPart_000_0139_01C3189E.56F14E20--

RE: Proxying the protocol...

am 12.05.2003 21:53:14 von Matt Gregory

This is a multi-part message in MIME format.

------=_NextPart_000_013E_01C3189E.98D57050
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Also: I have not validated Apache 2.0 for work yet. We are still using
apache 1.3.27

-----Original Message-----
From: Juan Rivera [mailto:Juan.Rivera@citrix.com]
Sent: Monday, May 12, 2003 9:56 AM
To: 'modproxy-dev@apache.org'
Subject: RE: Proxying the protocol...

Why don't you add your own custom header to the request?

-----Original Message-----
From: Matt Gregory [mailto:matt.gregory@skyleach.com]
Sent: Friday, May 09, 2003 12:44 PM
To: modproxy-dev@apache.org
Subject: Proxying the protocol...

Hey all. I have been researching and experimenting with this and have
not yet found a way to do it with either mod_rewrite or mod_proxy.

I have about 25 virtual hosts all with their own ssl keys. I want to
proxy them all through apache to JBoss and then have JBoss proxy content
from Zope.

The problem I am having is that I have a portlet-streamer tool which I
wrote and open-sourced which will rewrite the content links from zope
according to a configuration file which works very similar to
mod_rewrite (which I used as a guide). I have no problems except when I
try to determine what the original protocol was.

When using mod_proxy, I can use apache 2.0 and use the ProxyPreserveHost
directive to get the host from the request, or I can simply pull it from
the x-forward-host header property using my rewrite tool. Unfortunately
nothing in the request or the header tells me if the request was via
http or via https.

Is there any way to tell the target host the original protocol via a
header variable or a directive?

------=_NextPart_000_013E_01C3189E.98D57050
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">











style=3D'tab-interval:.5in'>



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Also: I have not validated Apache =
2.0 for
work yet.  We are still =
using apache
1.3.27



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----

From: Juan Rivera
[mailto:Juan.Rivera@citrix.com]

Sent: Monday, May 12, =
2003 9:56 AM

To: =
'modproxy-dev@apache.org'

Subject: RE: Proxying the
protocol...



face=3D"Times New Roman"> style=3D'font-size:12.0pt'> 



color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Why don't you =
add your
own custom header to the request?



color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'> =



face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----

From: Matt Gregory
[mailto:matt.gregory@skyleach.com]

Sent: Friday, May 09, =
2003 12:44
PM

To: =
modproxy-dev@apache.org

Subject: Proxying the =
protocol...



face=3D"Times New Roman"> style=3D'font-size:12.0pt'> 



color=3Dnavy
face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;color:navy'>H
ont
size=3D2 face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>ey all. style=3D'mso-spacerun:yes'>  I have been researching and
experimenting with this and have not yet found a way to do it with =
either
mod_rewrite or mod_proxy.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>I have about 25 virtual =
hosts all
with their own ssl keys.  I =
want to
proxy them all through apache to JBoss and then have JBoss proxy content =
from
Zope.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>The problem I am having is =
that I
have a portlet-streamer tool which I wrote and open-sourced which will =
rewrite
the content links from zope according to a configuration file which =
works very
similar to mod_rewrite (which I used as a guide). style=3D'mso-spacerun:yes'>  I have no problems except when =
I try to
determine what the original protocol was.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>When using mod_proxy, I can =
use
apache 2.0 and use the ProxyPreserveHost directive to get the host from =
the
request, or I can simply pull it from the x-forward-host header property =
using
my rewrite tool.  =
Unfortunately
nothing in the request or the header tells me if the request was via =
http or
via https.



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>  nt>



face=3DArial> style=3D'font-size:10.0pt;font-family:Arial'>Is there any way to tell =
the target
host the original protocol via a header variable or a =
directive?









------=_NextPart_000_013E_01C3189E.98D57050--

RE: Proxying the protocol...

am 13.05.2003 07:05:09 von Kwindla Hultman Kramer

Matt Gregory writes:
> Because I don't know how. I haven't found a way to add custom header
> variables via mod_rewrite or mod_proxy. Is there another apache module
> that will do this?
>

I maintain a set of patches for 1.3.2x mod_proxy that provide header
setting directives. They're mostly used in a reverse proxy context: so
ProxyRequestHeader sets headers in the request going to the backend
server(s), and ProxyResponseHeader sets headers in documents served to
clients.

Many sites have been using these patched mod_proxies in production
for two years or so (since 1.3.19).

http://allafrica.com/tools/apache/mod_proxy/

Kwin