Haptoxy set-header
Jump to navigation
Jump to search
http-request set-header Connection keep-alive # http-request set-header X-Forwarded-Proto https # http-request set-header X-Forwarded-Host %[req.hdr(Host)] option forwardfor http-send-name-header Host # http-request set-header Host node1.myapp.mycompany.com if { srv_id 1 } # option host # http-request set-header Host %[req.hdr(Host)] # http-request set-header Host 192.168.1.2 # server 02-www.example.com.stage.mktp.io 192.168.1.2:80 check inter 30s # server 01-www.example.com 192.168.1.3:80 check inter 30s server host1.be.example.com host1.be.example.com:80 check inter 30s server host2.be.extendhealth.com whost1.be.example.com:80 check inter 30s
global master-worker no-exit-on-failure mworker-max-reloads 3 hard-stop-after 301s log stdout format raw local0 info # stats socket /var/run/haproxy.sock mode 600 level admin defaults mode http timeout client 10s timeout connect 5s timeout server 10s timeout http-request 10s log global resolvers mynameservers nameserver ns1 8.8.8.8:53 nameserver ns2 8.8.4.4:53 frontend stats bind :8080 stats enable stats uri /stats stats refresh 10s mode http # stats admin if TRUE stats auth admin:changeme
frontend frontend_tfs use_backend healthz if { path /healthz } || { path_beg /healthz/ } bind :8443 ssl crt /etc/ssl/selfsigned.pem default_backend backend_tfs mode http option http-keep-alive log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r %sslv %sslc %[ssl_fc_cipherlist_str]" backend healthz http-request return status 200 content-type "text/plain" lf-string "ok"