This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
решение_haproxy [2024/03/11 13:14] val |
решение_haproxy [2025/01/14 14:50] (current) val |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| * [[https://www.haproxy.com/documentation/haproxy-configuration-tutorials/http-rewrites/|HAProxy config tutorials HTTP rewrites]] | * [[https://www.haproxy.com/documentation/haproxy-configuration-tutorials/http-rewrites/|HAProxy config tutorials HTTP rewrites]] | ||
| * [[https://serverfault.com/questions/560978/configure-multiple-ssl-certificates-in-haproxy|Configure multiple SSL certificates in Haproxy]] | * [[https://serverfault.com/questions/560978/configure-multiple-ssl-certificates-in-haproxy|Configure multiple SSL certificates in Haproxy]] | ||
| + | * [[https://youtu.be/oIczkkD-hOU|Видео урок: Доступ к приложениям в Bare-Metal Kubernetes]] | ||
| <code> | <code> | ||
| Line 32: | Line 33: | ||
| 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 43: | Line 44: | ||
| 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: | ||
| # tail -f /var/log/haproxy.log | # tail -f /var/log/haproxy.log | ||
| # journalctl -f | grep proxy | # journalctl -f | grep proxy | ||
| + | # ###haproxy -f /etc/haproxy/haproxy.cfg -d | ||
| + | |||
| + | # echo "show stat" | socat stdio /run/haproxy/admin.sock | cut -d ',' -f 1,2,18 | ||
| haproxy# curl https://localhost/ -H "Host: gowebd.corpX.un" -k | haproxy# curl https://localhost/ -H "Host: gowebd.corpX.un" -k | ||
| </code> | </code> | ||