httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Schoenboeck - domaintechnik.at" ...@domaintechnik.at>
Subject [users@httpd] Problem with (SSL)ReverseProxy and redirects (HTTP/1.1 302)
Date Tue, 06 Sep 2005 07:05:23 GMT
Hi,

I have a very big problem with ReverseProxy and CGI/PHP http-redirects.

I have three domains, e.g. domainEXT.xy, domainINT1.xy and domainINT2.xy
(The INT domains are on another server)
For domainEXT.xy i hafe a SSL-cert. (https://domainEXT.xy) works fine.
So i had the idea to make a ReverseProxy for the another 2 domains, to make them secure.
E.g.
https://domainEXT.xy/domainINT1.xy/
https://domainEXT.xy/domainINT2.xy/

On Apache 2.0.54/win32 i activeted now mod_proxy, mod_proxy_http, mod_proxy_connect and mod_proxy_html

And wrote the folowing in the httpd.conf
<VirtualHost ...:443>
  ServerName domainext.xy
  ### SSL config here ###
  ProxyRequests off
  ProxyPass /domainint1.xy/ http://domainint1.xy/
  ProxyHTMLURLMap http://domainint1.xy /domainint1.xy
  <Location /domainint1.xy/>
    ProxyPassReverse /
    SetOutputFilter proxy-html
    ProxyHTMLURLMap / /domainint1.xy/
    ProxyHTMLURLMap /domainint1.xy /domainint1.xy
    RequestHeader unset Accept-Encoding
  </Location>
  ProxyPass /domainint2.xy/ http://domainint2.xy/
  ProxyHTMLURLMap http://domainint2.xy /domainint2.xy
  <Location /domainint2.xy/>
    ProxyPassReverse /
    SetOutputFilter proxy-html
    ProxyHTMLURLMap / /domainint2.xy/
    ProxyHTMLURLMap /domainint2.xy /domainint2.xy
    RequestHeader unset Accept-Encoding
  </Location>
  Options -Indexes MultiViews
  DirectoryIndex index.php
  DocumentRoot "/web/public/"
</VirtualHost>

This works realy fine, but:
Now i hafe a script on http://domainINT2.xy/file.php in this file there is a header redirect:
HTTP/1.1 302
Location: http://domainINT2.xy/file2.php
Without the Proxy it will work, but if i call https://domainEXT.xy/domainINT2.xy/file.php
it makes also a redirect to http://domainINT2.xy/file2.php and not to https://domainEXT.xy/domainINT2.xy/file2.php

Now my question:
How can i say mod_proxy* also to rewrite this Location headers if in it the domain name?
(cos i can't modify the scripts of the domainINT* domain names.)
I am shure this must work, but i don't know how?

I hope you can help please, and sorry for my bad english!

Greetings
Michael


---------------------------------------------------------------------
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


Mime
View raw message