Discussion:
Proxying the protocol...
Matt Gregory
2003-05-09 16:43:30 UTC
Permalink
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?
Daniel Lopez
2003-05-11 10:35:26 UTC
Permalink
Post by Matt Gregory
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/
Juan Rivera
2003-05-12 13:56:06 UTC
Permalink
Why don't you add your own custom header to the request?

-----Original Message-----
From: Matt Gregory [mailto:***@skyleach.com]
Sent: Friday, May 09, 2003 12:44 PM
To: modproxy-***@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?
Matt Gregory
2003-05-12 19:53:14 UTC
Permalink
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:***@citrix.com]
Sent: Monday, May 12, 2003 9:56 AM
To: 'modproxy-***@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:***@skyleach.com]
Sent: Friday, May 09, 2003 12:44 PM
To: modproxy-***@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?
Matt Gregory
2003-05-12 19:51:23 UTC
Permalink
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:***@citrix.com]
Sent: Monday, May 12, 2003 9:56 AM
To: 'modproxy-***@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:***@skyleach.com]
Sent: Friday, May 09, 2003 12:44 PM
To: modproxy-***@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?
Kwindla Hultman Kramer
2003-05-13 05:05:09 UTC
Permalink
Post by Matt Gregory
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

Loading...