I have hosted my domain in a Shared IP hosting platform. I have configured HAProxy on Google Compute Engine to route the traffic through. But When I tried to access the HAProxy server IP, I'm getting my shared hosting platform default page (Like CPanel default page when we tried to access the site via IP address.)
Here is the additional configuration I have added in HAProxy config:
resolvers public-dns
nameserver dns1 4.4.4.4:53
nameserver dns2 8.8.8.8:53
frontend http
bind *:80
stats uri /haproxy?stats
default_backend site-backend
backend site-backend
mode http
balance roundrobin
option httpclose
option forwardfor
reqadd Host:\ app.domain_name.com
server mysite app.domain_name.com:80 resolvers public-dns check inter 1000 resolve-prefer ipv4
How do I get my correct website using HAProxy ?