httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Womann, Sven" <...@de.festo.com>
Subject RE: [users@httpd] Apache 2.4 ReverseProxy Issue
Date Tue, 03 Sep 2013 13:58:37 GMT
I figured out the following:

I run a 2.4.6 Apache as reverse proxy in front of serveral backend servers. Therefor I use
Rewrite with P flag and ProxyPassReverse.

My config looks like this:

RewriteRule ^/cms/(([a-z]{2})(-[a-z]{2})?)_([a-z]{2,})/(.*)$ http://twww2_I.example.com:8080/cps/rde/xchg/${lc:$4}/hs.xsl/$5?Locale=$2&wsLocale=$1&wsCountry=$4
[P,NC,QSA,L]
        <Location /cms/>
                ProxyPassReverse /cps/rde/xchg/de/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/at/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/de-de/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/ch-fr/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/gb/hs.xsl/
               ProxyPassReverse /cps/rde/xchg/us/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/en-us_us/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/en-gb_gb/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/es/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/fi/hs.xsl/
                ProxyPassReverse /cps/rde/xchg/fi_fi/hs.xsl/
        </Location>

Now I request a URL (http://www.example.com/cms/de_de/basket.htm) which send a redirect 302
to https. The RP changes the location to http and I have a loop.
I sniffered between client and RP and backend. It is really the RP.

In other scenarios where I just have 

<Location /app/>
                ProxyPassReverse /
</Locationn>

it works as it should.

With Apache 2.2 I don' t have this issue.

-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de] 
Sent: Saturday, August 24, 2013 10:50 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache 2.4 ReverseProxy Issue

On 21.08.2013 13:42, Womann, Sven wrote:
> Sorry, I meant to write example.com...
> 
> I use include my RP-Rules in a dedicated file.
> There I work with RewriteRule ^/(.*)$ http://internal.example.com/$1 
> [P,QSA,L] ProxyPassReverse is used in a Location directive like
> 
> <Location />
> 	ProxyPassReverse /
> </Location>
> 
> The 302 Location is full qualified, so normaly the ProxyPassReverse shouldn' t match...

A standards conforming Location header always if a full URL.
The only reason for a ProxyPassReverse is fixing Location headers, so your assumptions are
not valid here ;)

If your backend already provides the correct Location headers for any redirect, then remove
the ProxyPassReverse.

> The header is set correctly, but the 302 changes in front of the RP.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Festo AG & Co. KG
 Sven Womann
Abteilung IM-WMS
Inf. Mgmt. Web and Security
Plieninger Strasse 50
73760 Ostfildern-Scharnhausen
Deutschland
Telefon +49(711)347-2898
Telefax +49(711)34754-2898
http://www.festo.com

Der Inhalt dieser E-Mail und moeglicher Anhaenge sind ausschliesslich fuer den bezeichneten
Adressaten bestimmt.
Jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts
dieser E-Mail und
moeglicher Anhaenge durch unberechtigte Dritte ist unzulaessig. Wir bitten Sie, sich mit dem
Absender der E-Mail in
Verbindung zu setzen, falls Sie nicht der Adressat dieser E-Mail sind sowie das Material von
Ihrem Computer zu loeschen.

This e-mail and any attachments are confidential and intended solely for the addressee. The
perusal, publication, copying
or dissemination of the contents of this e-mail by unauthorised third parties is prohibited.
If you are not the intended
recipient of this e-mail, please delete it and immediately notify the sender.

Rechtsform: Kommanditgesellschaft, Sitz: Esslingen a.N., Registergericht Stuttgart HRA 211583,
Umsatzsteuerident-Nummer: DE 145339206
Persoenlich haftende Gesellschafterin: Festo Management Aktiengesellschaft, Sitz: Wien/Oesterreich,
Firmenbuchgericht: Handelsgericht Wien, Firmenbuch Nr. FN 303027 d
Vorstand: Dipl.-Kfm. Alfred Goll, Dr. Claus Jessen, Dr. Ansgar Kriwet, Dipl.-Kfm. Michael
Moelleken, Dr. Eberhard Veit (Vorsitzender)
Aufsichtsratsvorsitzender: Prof. Dr.-Ing. Dr.-Ing. E.h. Klaus Wucherer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message