This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
решение_haproxy [2024/03/04 09:31] val |
решение_haproxy [2024/04/08 14:08] val |
||
---|---|---|---|
Line 8: | Line 8: | ||
gate# apt install haproxy | gate# apt install haproxy | ||
- | gate# cat gowebd.crt wild.key > /etc/ssl/private/wild.crtkey | + | gate# cat wild.crt wild.key > /etc/ssl/private/wild.crtkey |
+ | gate# ###cat gowebd.crt gowebd.key > /etc/ssl/private/gowebd.crtkey | ||
gate# ###cat keycloak.crt keycloak.key > /etc/ssl/private/keycloak.crtkey | gate# ###cat keycloak.crt keycloak.key > /etc/ssl/private/keycloak.crtkey | ||
Line 31: | Line 32: | ||
backend bk-kube-ingress | backend bk-kube-ingress | ||
- | # http-request set-header X-Forwarded-Proto https if { ssl_fc } # For Proto | + | # http-request set-header X-Forwarded-Proto https if { ssl_fc } |
# http-request set-header X-Forwarded-Host %[req.hdr(Host)] | # http-request set-header X-Forwarded-Host %[req.hdr(Host)] | ||
# http-request set-header X-Forwarded-Port %[dst_port] | # http-request set-header X-Forwarded-Port %[dst_port] | ||
Line 42: | Line 43: | ||
balance roundrobin | balance roundrobin | ||
- | server kube1 kube2:80 check | + | server kube1 kube1:80 check |
server kube2 kube2:80 check | server kube2 kube2:80 check | ||
server kube3 kube3:80 check | server kube3 kube3:80 check | ||
Line 60: | Line 61: | ||
# journalctl -f | grep proxy | # journalctl -f | grep proxy | ||
- | haproxy# curl http://localhost/ -H "Host: gowebd.corpX.un" | + | haproxy# curl https://localhost/ -H "Host: gowebd.corpX.un" -k |
</code> | </code> | ||