You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modproxy-dev@apache.org by Matt Gregory <ma...@skyleach.com> on 2003/05/09 18:43:30 UTC

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?

Re: Proxying the protocol...

Posted by Daniel Lopez <da...@rawbyte.com>.
> 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/