Hi everyone,
My haproxy is performing a basic LB active/passive to 2 apache servers. The HTTPS part is working as expected. However, I have trouble to perform the appropriate healthcheck on the backend HTTP part.
The backend (apache) is redirecting port 8080 (http) to 8443 (https). So when the healthcheck is using HTTP (port 8080) i’m getting a 302 instead of the 200 (which seems normal).
I tried to perform the healthcheck on the HTTPS port (8443) instead, but i’m getting an error 400.
Moreover, checking the HTTPS port doesn’t means the HTTP port (8080) is working.
Any other (better) idea/advice on implementing this healthcheck ?
#-----------------------------------
# frontend in TCP
#-----------------------------------
frontend frontend-http
bind 192.168.0.86:8080
mode tcp
option tcplog
default_backend backend-http
frontend frontend-https
bind 192.168.0.86:8443
mode tcp
option tcplog
default_backend backend-https
#-----------------------------------
# backend in TCP
#-----------------------------------
backend backend-http
balance roundrobin
mode tcp
server backend-http-1 192.168.0.82:8080 check port 8443 ssl verify none
server backend-http-2 192.168.0.82:8080 check port 8443 ssl verify none backup
option httpchk GET /status/
http-check expect status 200
backend backend-https
balance roundrobin
mode tcp
server backend-https-1 192.168.0.82:8443 check ssl verify none
server backend-https-2 192.168.0.85:8443 check ssl verify none backup
option httpchk GET /status/
http-check expect status 200
Thanks,