Reverse proxy - Getting CGI environment variable on backend server

Hi All,

I'm using reverse proxy to forward request to my internal apache server,
which is working fine.
Here is my configuration on front apache server:

ProxyRequests Off
ProxyPassInterpolateEnv On
ProxyPass /someapp http://internal_server/someapp interpolate
ProxyPassReverse /someapp http://internal_server/someapp interpolate

I want to access the CGI environment variables on my backend servers.

Actually I want to setup a shibboleth environment my Shibboleth Service
provider is running on my front end apache server and shibboleth
protected application on internal server. After authentication Server
provider set some attributes on front end server's environment and I
want those attributes to be accessible to my application running on
backend apache server. So is it possible to forward some environment
variable from front server to backend servers and if yes then how?

Thanks in advance
ap1285






------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Amit Panwar [ Fr, 09 April 2010 15:14 ] [ ID #2038325 ]

Re: Reverse proxy - Getting CGI environment variable on

On Fri, Apr 9, 2010 at 2:14 PM, Amit Panwar <amit.p [at] imfinity.com> wrote:
> Hi All,
>
> I'm using reverse proxy to forward request to my internal apache server,
> which is working fine.
> Here is my configuration on front apache server:
>
> =C2=A0 ProxyRequests Off
> =C2=A0 ProxyPassInterpolateEnv On
> =C2=A0 ProxyPass /someapp http://internal_server/someapp interpolate
> =C2=A0 ProxyPassReverse /someapp http://internal_server/someapp interpola=
te
>
> I want to access the CGI environment variables on my backend servers.
>
> Actually I want to setup a shibboleth environment my Shibboleth Service
> provider is running on my front end apache server and shibboleth protecte=
d
> application on internal server. After authentication Server provider set
> some attributes on front end server's environment and I want those
> attributes to be accessible to my application running on backend apache
> server. So is it possible to forward some environment variable from front
> server to backend servers and if yes then how?
>
> Thanks in advance
> ap1285
>
>

Convert them into additional request headers:

RequestHeader set X-Shib-Attribute %{Shib-Attribute}e

Cheers

Tom

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Tom Evans [ Fr, 09 April 2010 15:34 ] [ ID #2038326 ]

Re: Reverse proxy - Getting CGI environment variable on backend server

From: "Amit Panwar" <amit.p [at] imfinity.com>
To: <users [at] httpd.apache.org>
Sent: Friday, April 09, 2010 4:14 PM
Subject: [users [at] httpd] Reverse proxy - Getting CGI environment variable on
backend server


> Hi All,
>
> I'm using reverse proxy to forward request to my internal apache server,
> which is working fine.
> Here is my configuration on front apache server:
>
> ProxyRequests Off
> ProxyPassInterpolateEnv On
> ProxyPass /someapp http://internal_server/someapp interpolate
> ProxyPassReverse /someapp http://internal_server/someapp interpolate
>
> I want to access the CGI environment variables on my backend servers.
>
> Actually I want to setup a shibboleth environment my Shibboleth Service
> provider is running on my front end apache server and shibboleth protected
> application on internal server. After authentication Server provider set
> some attributes on front end server's environment and I want those
> attributes to be accessible to my application running on backend apache
> server. So is it possible to forward some environment variable from front
> server to backend servers and if yes then how?
>
> Thanks in advance


I use to set HTTP headers in the configuration file of the proxy/load
balancer:

RequestHeader set X-HTTPS On

All the requests to the SSL virtualhost will have an HTTP header
X-HTTPS: On

This header can be verified in the back-end server/application.

In order to use this directive, you need to load the module mod_headers.

Octavian


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5012 (20100409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Octavian Rasnita [ Fr, 09 April 2010 15:33 ] [ ID #2038327 ]
Webserver » gmane.comp.apache.user » Reverse proxy - Getting CGI environment variable on backend server

Vorheriges Thema: HTTPS Connection Timeouts
Nächstes Thema: SSLProxyCipherSuite directive ignored