[users@httpd] Problem with (SSL)ReverseProxy and redirects (HTTP/1.1 302)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux