Hi list, we have following logical constellation with two wan-ports in use:
<Provider A + Provider B => Router>----<Pound>---<Webserver> Here is a simplified example for our situation: (test1|test2).domain.(com|de) with official IP (Provider A and B) (test1|test2).domain.pwd with private IP (Pound) => 192.168.0.99 (test1|test2).domain.hst with private IP (Webserver) => 192.168.0.100 The first variant (test1) is to solve: * Pound changed https to webserver http * Pound passthru the http to webservers http The second variant (test2) is to solve: * Pound passthru the https to webservers https * Pound passthru the http to webservers http The Webserver redirect automatic http requests if https is required and vice versa... Our problem is "A" with a request, that must be http as final request/result: A. If we request from outside then following happens: curl -I -k https://test1.domain.com/ > HTTP/1.1 302 Moved Temporarily > ... > Location: https://test1.domain.com/ B. If we request from pound-(in)side then following happens: curl -I -k https://test1.domain.pwd/ > HTTP/1.1 302 Moved Temporarily > ... > Location: http://test1.domain.pwd/ C. If we request the webserver direct: curl -I -k https://test1.domain.hst/ > HTTP/1.1 302 Moved Temporarily > ... > Location: http://test1.domain.hst/ I think, B and C do it right, but A is mystic ... why rewriting the location??? It is the same as B, the only difference ist the port number! Have you any ideas? Here is my simplified configuration ### pound.cfg (with the relevant parts) ########################################################### # ( .pwd ( default ) -> 192.168.0.1:80/443 <--> 192.168.0.99:80/443 # ( .com ( Provider A ) -> 192.168.0.1:80/443 <--> 192.168.0.99:8081/8444 # ( .de ( Provider B ) -> 192.168.0.1:80/443 <--> 192.168.0.99:8082/8445 # # ( The special ports for HTTP and HTTPS 8081-8082 and 8444-8445 are routerkonfiguration specific! ) ########################################################################################## ### ( default http ) ### ListenHTTP Address 192.168.100.99 Port 80 RewriteLocation 0 Service HeadRequire "Host: test(1|2)\.domain\.(...?)" BackEnd Address 192.168.100.111 Port 80 End End # ... End ### ( Provider A http ) ### ListenHTTP Address 192.168.0.99 Port 8081 RewriteLocation 0 Service HeadRequire "Host: test(1|2)\.domain\.(...?)" BackEnd Address 192.168.0.100 Port 80 End End # ... End # ... ### ( default https ) ### ListenHTTPS Address 192.168.0.99 Port 443 Cert "/etc/pki/tls/certs/pound.pem" Service HeadRequire "Host: test2\.domain\.(...?)" BackEnd Address 192.168.0.100 Port 443 HTTPS End End Service HeadRequire "Host: test1\.domain\.(...?)" BackEnd Address 192.168.0.100 Port 80 End End # ... End ### ( Provider A https ) ### ListenHTTPS Address 192.168.0.99 Port 8444 Cert "/etc/pki/tls/certs/pound.pem" Service HeadRequire "Host: test2\.domain\.(...?)" BackEnd Address 192.168.0.100 Port 443 HTTPS End End Service HeadRequire "Host: test1\.domain\.(...?)" BackEnd Address 192.168.0.100 Port 80 End End # ... End # ...
