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 ssl crt /etc/haproxy/certs/ 
    mode http
    maxconn 2000
    balance leastconn
    option redispatch
    server iisl004 check
    server iisl005 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 in the browser it is working fine.

Add your own answers!

Related Questions

Preset runtime parameters for a docker container

1  Asked on November 4, 2021 by ormfo4i5fm


terraform – shall one use simple disk or linux LVM?

0  Asked on November 4, 2021 by wojtas-zet


GCP – Quickstart: Build and Deploy Problems

1  Asked on November 4, 2021 by ajiroghene


how to setup Carton, to compile znapzend 0.20.0?

1  Asked on November 4, 2021 by crestop


Recover data from IBM x3650 with SYS BRD ERR

1  Asked on November 4, 2021 by maxxer


cloning NTFS disk

1  Asked on November 4, 2021 by lucio-crusca


Apache Link to PHP run application/x-httpd-php *

1  Asked on February 28, 2021 by wobbo


uwsgi, multiple environment variables

2  Asked on February 25, 2021 by user204088


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP