# Stats can't open from hostname

**URL:** <https://discourse.haproxy.org/t/stats-cant-open-from-hostname/5768>\
**Category:** Help!\
**Created:** [October 1, 2020, 9:13pm UTC](https://discourse.haproxy.org/t/stats-cant-open-from-hostname/5768 "2020-10-01T21:13:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jriker1](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jriker1](https://discourse.haproxy.org/u/jriker1)\
**Post date:** [October 1, 2020, 9:13pm UTC](https://discourse.haproxy.org/t/stats-cant-open-from-hostname/5768/1 "2020-10-01T21:13:45Z")

</div>

I have bigger questions but can’t access my HAProxy server right now and would prefer sharing all the configuraiton settings. However, I do have a stats question and a seemingly basic stats setup:

listen stats  
bind :1936  
mode http  
log global  
maxconn 10  
stats enable  
stats hide-version  
stats refresh 30s  
stats show-node  
stats auth :  
stats uri /

It works fine if I go to [http://192.168.0.60:1936](http://192.168.0.60:1936) but if I go to [http://haproxy:1936](http://haproxy:1936) or [http://haproxy.REMOVED.local:1936](http://haproxy.REMOVED.local:1936) it fails to open. I have my own DNS server and haproxy is in DNS and is set to 192.168.0.60 and it does ping/resolve. Any idea why it’s ownly working with IP?

Thanks

JR

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [October 2, 2020, 7:57am UTC](https://discourse.haproxy.org/t/stats-cant-open-from-hostname/5768/2 "2020-10-02T07:57:56Z")

</div>

No, no idea.

The stats socket is certainly not checking or refusing request based on the Host header.

I suggest you make a wireshark capture and check if your browser actually sends the request to this IP.

---

<div class="post-metadata">

**Author:** ![jriker1](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jriker1](https://discourse.haproxy.org/u/jriker1)\
**Post date:** [October 2, 2020, 5:04pm UTC](https://discourse.haproxy.org/t/stats-cant-open-from-hostname/5768/3 "2020-10-02T17:04:11Z")

</div>

Working now. Must have taken some time for some reason or something was cached.
