TransWikia.com

HAproxy - Load Balancer working with frontend IP but not with hostname

Server Fault Asked by Ze Beto on December 23, 2020

We have Haproxy installed in a CentOS VM.
I need to load balance access to 3 IIS servers using SSL.
The VIP was created on keepalived.conf and the SSL certificate is being issued.

If I go to HAproxy stats page everything is green and I can see the traffic.
DNS was set up.
However, I am only being forwarded to the IIS page when using the ip address of the frontend load balancer.
If I try to use the hostname I am getting a 403 forbidden access error message in the browser.

403 forbidden error

My Haproxy config file shows the following.

listen services
    bind 10.10.10.120:443 ssl crt /etc/haproxy/certs/wildcard.example.com.pem 
    mode http
    maxconn 2000
    balance leastconn
    option redispatch
    server iisl004 10.10.9.100:80 check
    server iisl005 10.10.9.101:80 check

I can I be forwarded using the hostname instead of the IP address?
Is the error coming from the IIS server?

If I type https://10.10.10.120 in the browser it is working fine.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP