frontend domain.com
bind 0.0.0.0:443 ssl crt /etc/haproxy/certs/domain.com.pem
http-request redirect scheme https if !{ ssl_fc }
option http-server-close
option httplog
option forwardfor
reqadd X-Forwarded-Proto:\ https
reqadd X-Forwarded-Port:\ 443
# set HTTP Strict Transport Security (HTST) header
rspadd Strict-Transport-Security:\ max-age=15768000
acl host_domain.com hdr(host) -i domain.com
use_backend domain.com if host_domain.com
backend domain.com
balance leastconn
option http-keep-alive
option forwardfor
cookie SERVERID insert indirect nocache
timeout connect 30000
timeout server 30000
server server1 1.1.1.1:443 cookie 1 ssl verify none
server server2 2.2.2.2:443 cookie 2 ssl verify none
server server3 3.3.3.3:443 cookie 4 ssl verify none
frontend de.domain.com
bind 0.0.0.0:443 ssl crt /etc/haproxy/certs/de.domain.com.pem
http-request redirect scheme https if !{ ssl_fc }
option http-server-close
option httplog
option forwardfor
reqadd X-Forwarded-Proto:\ https
reqadd X-Forwarded-Port:\ 443
# set HTTP Strict Transport Security (HTST) header
rspadd Strict-Transport-Security:\ max-age=15768000
acl host_de.domain.com hdr(host) -i de.domain.com
use_backend de.domain.com if host_de.domain.com
backend de.domain.com
balance leastconn
option http-keep-alive
option forwardfor
cookie SERVERID insert indirect nocache
timeout connect 30000
timeout server 30000
server server1 1.1.1.1:443 cookie 1 ssl verify none
server server2 2.2.2.2:443 cookie 2 ssl verify none
server server3 3.3.3.3:443 cookie 4 ssl verify none
frontend en.domain.com
bind 0.0.0.0:443 ssl crt /etc/haproxy/certs/en.domain.com.pem
http-request redirect scheme https if !{ ssl_fc }
option http-server-close
option httplog
option forwardfor
reqadd X-Forwarded-Proto:\ https
reqadd X-Forwarded-Port:\ 443
# set HTTP Strict Transport Security (HTST) header
rspadd Strict-Transport-Security:\ max-age=15768000
acl host_en.domain.com hdr(host) -i en.domain.com
use_backend en.domain.com if host_en.domain.com
backend en.domain.com
balance leastconn
option http-keep-alive
option forwardfor
cookie SERVERID insert indirect nocache
timeout connect 30000
timeout server 30000
server server1 1.1.1.1:443 cookie 1 ssl verify none
server server2 2.2.2.2:443 cookie 2 ssl verify none
server server3 3.3.3.3:443 cookie 4 ssl verify none
location / {
root ПУТЬ К ПАПКЕ С ФАЙЛАМИ ;
proxy_pass http://127.0.0.1:1080/;
}