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 following redirects :
- http://server.domain.com/ -> https://server.domain.com/ [OK]
- https://other.domain.com/ -> https://other.domain.com/ [PROBLEM]
I can not create the ACL. Can you help me ?
listen http
bind *:80
acl url_admin hdr_beg server.domain.com
redirect prefix https://server.domain.com if url_admin
server srv 127.0.0.1:8080 maxconn 256
listen https
bind 192.168.0.100:8443
acl url_admin hdr_beg server.domain.com
redirect prefix http://XXXXX unless url_admin
option forwardfor except 192.168.0.100
server srv 127.0.0.1:8080 maxconn 256
Thanks,
Regards.