Re: Redirect HTTP to HTTPS and HTTPS to HTTP

2011-01-17 Thread Jeremy Hinegardner
On Sun, Jan 16, 2011 at 07:21:19PM +0100, Henri Storn wrote: > Hello, > > I have a server hosting multiple Web sites. I use HAProxy, Stunnel and > HTTPD : > > HTTP -> HAProxy (80) -> HTTPD (8080) > HTTPS -> Stunnel (443) -> HAproxy (8443) -> HTTPD (8080) > > I want a single Web site is accessible

Re: Redirect HTTP to HTTPS and HTTPS to HTTP

2011-01-17 Thread Henri Storn
Hello, I can not perform the redirect to HTTP : listen https bind 192.168.0.100:8443 acl url_admin hdr(host) -i server1.domain.com redirect prefix http://hdr(host) unless url_admin option forwardfor except 192.168.0.100 server srv 127.0.0.1:8080 maxconn 25

Re: Redirect HTTP to HTTPS and HTTPS to HTTP

2011-01-16 Thread XANi
Hi, In that config easies way is to check what is the source IP of incoming connection, if it comes from 127.0.0.1 (or w/e. is ur stunnel server address) its HTTPS else its HTTP. Like acl is_ssl src 127.0.0.1 and then use it in redirect. I did similiar thing, but with lighttpd as frontend and con

Redirect HTTP to HTTPS and HTTPS to HTTP

2011-01-16 Thread Henri Storn
Hello, I have a server hosting multiple Web sites. I use HAProxy, Stunnel and HTTPD : HTTP -> HAProxy (80) -> HTTPD (8080) HTTPS -> Stunnel (443) -> HAproxy (8443) -> HTTPD (8080) I want a single Web site is accessible via HTTPS. The others are only accessible by HTTP. I want to do the follo