You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ch...@LEW.DE on 2011/09/13 15:01:54 UTC
[users@httpd] Reverse-Proxy und Redirect
Hallo zusammen,
ich möchte eine Reverse-Proxy mit APACHE aufsetzen.
Dafür habe ich ein vhost angelegt mit folgenden Direktiven:
...
ProxyRequests Off
<Location /app1>
ProxyPass http://intern.de/app1
ProxyPassReverse http://extern.de
</Location>
...
Beim ersten Aufruf wird die URL http://intern.de/app1 nach http://intern.de/logon weitergeleitet.
Und nun bekomme ich statt http://extern.de/logon die interne URL http://intern.de/logon zurück, die natürlich von außen nicht erreichbar ist.
Was muss ich an meiner Konfiguration ändern um dieses Problem zu beheben
Vielen Dank
Christian
Re: [users@httpd] Reverse-Proxy und Redirect
Posted by Tom Evans <te...@googlemail.com>.
On Wed, Sep 14, 2011 at 12:00 PM, <Ch...@lew.de> wrote:
> Hello,
>
> yes you are right, I've already corrected this:
>
> ...
>
> ProxyPreserveHost On
>
> <Location /online>
> ProxyPass https://intern.de/app1
> ProxyPassReverse https://intern.de/app1
> </Location>
>
>
> But it doesn't work.
>
> If I call http://extern.de/online, I get as reponse URL http://extern.de/app1 shown in my browser.
> Shouldn't it be http://extern.de/online
>
Hard to say - what ProxyPassReverse does is to update Location,
Content-Location and URI headers if they start with the value of the
ProxyPassReverse.
Eg, if a response from intern.de has this header:
Location: https://intern.de/app1/wibble
Then this would be updated to:
Location: <host>/online/wibble
The value for <host> is either the ServerName, or the Host header of
the original request, depending on whether UseCanonicalName is On or
Off.
It will only update those three headers though, it will not update any
HTML, javascript or anything else.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
AW: [users@httpd] Reverse-Proxy und Redirect
Posted by Ch...@LEW.DE.
Hello,
yes you are right, I've already corrected this:
...
ProxyPreserveHost On
<Location /online>
ProxyPass https://intern.de/app1
ProxyPassReverse https://intern.de/app1
</Location>
But it doesn't work.
If I call http://extern.de/online, I get as reponse URL http://extern.de/app1 shown in my browser.
Shouldn't it be http://extern.de/online
-----Ursprüngliche Nachricht-----
Von: Tom Evans [mailto:tevans.uk@googlemail.com]
Gesendet: Mittwoch, 14. September 2011 12:43
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Reverse-Proxy und Redirect
On Tue, Sep 13, 2011 at 2:25 PM, <Ch...@lew.de> wrote:
> Hello to all,
>
> I'm trying to set up a APACHE Reverse-Proxy
>
> I've created a vhost with following directives:
>
>
> …
> ProxyRequests Off
>
> <Location /app1>
> ProxyPass http://intern.de/app1
> ProxyPassReverse http://extern.de
^^^ this should be ProxyPassReverse http://intern.de/app1 for reverse mapping to work correctly.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Reverse-Proxy und Redirect
Posted by Tom Evans <te...@googlemail.com>.
On Tue, Sep 13, 2011 at 2:25 PM, <Ch...@lew.de> wrote:
> Hello to all,
>
> I'm trying to set up a APACHE Reverse-Proxy
>
> I've created a vhost with following directives:
>
>
> …
> ProxyRequests Off
>
> <Location /app1>
> ProxyPass http://intern.de/app1
> ProxyPassReverse http://extern.de
^^^ this should be ProxyPassReverse http://intern.de/app1 for reverse
mapping to work correctly.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
AW: [users@httpd] Reverse-Proxy und Redirect
Posted by Ch...@LEW.DE.
Hello to all,
I'm trying to set up a APACHE Reverse-Proxy
I've created a vhost with following directives:
…
ProxyRequests Off
<Location /app1>
ProxyPass http://intern.de/app1
ProxyPassReverse http://extern.de
</Location>
…
At first call, the URL http://intern.de/app1 will be redirected from der backend server to http://intern.de/logon
Now the URL displayed extern to he caller is http://intern.de/logon instead of http://extern.de/logon.
The URL http://intern.de/logon is not available from extern. It also should be hidden.
Now, what must I do to solve this problem
Best regards
Christian
-----Ursprüngliche Nachricht-----
Von: Nick Kew [mailto:nick@webthing.com]
Gesendet: Dienstag, 13. September 2011 15:17
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Reverse-Proxy und Redirect
On Tue, 13 Sep 2011 13:01:54 +0000
<Ch...@LEW.DE> wrote:
> Und nun bekomme ich statt http://extern.de/logon die interne URL http://intern.de/logon zurück, die natürlich von außen nicht erreichbar ist.
http://www.apachetutor.org/admin/reverseproxies
(Englisch - auf Deutsch kann ich leider nicht helfen).
--
Nick Kew
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Reverse-Proxy und Redirect
Posted by Nick Kew <ni...@webthing.com>.
On Tue, 13 Sep 2011 13:01:54 +0000
<Ch...@LEW.DE> wrote:
> Und nun bekomme ich statt http://extern.de/logon die interne URL http://intern.de/logon zurück, die natürlich von außen nicht erreichbar ist.
http://www.apachetutor.org/admin/reverseproxies
(Englisch - auf Deutsch kann ich leider nicht helfen).
--
Nick Kew
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org