# Websocket configuration problem

**URL:** <https://discourse.haproxy.org/t/websocket-configuration-problem/9565>\
**Category:** Help!\
**Created:** [February 29, 2024, 12:32pm UTC](https://discourse.haproxy.org/t/websocket-configuration-problem/9565 "2024-02-29T12:32:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CP\_QIT](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@CP\_QIT](https://discourse.haproxy.org/u/CP_QIT)\
**Post date:** [February 29, 2024, 12:32pm UTC](https://discourse.haproxy.org/t/websocket-configuration-problem/9565/1 "2024-02-29T12:32:52Z")

</div>

Hi, I have problem to make WebSockets work.  
I have 2 balancers:

- one used to balance requests to my web domain with HTTPs and having roundrobin to other 2 VMs having Apache with html and JS (to give name “FE\_PROXY”)
- the other balancer is called from what we have deployed inside Apache in previous step.to balance backend API on another VM (this proxy is named as “BE\_PROXY”)

So in few words we have a balancer (FE\_PROXY) to balance the requests towards - for example - [www.myfrontent.com](http://www.myfrontent.com) (with https) and on the each web frontend on Apache call the BE\_PROXY to serve APIs. All works fine but when we try to open a websocket (responding on url /livechat) we see this entry on log of haproxy of BE\_PROXY:

core\_fe core\_be/core\_be\_server\_2 0/0/0/2/2 400 115 - - ---- 1/1/0/0/0 0/0 “GET /livechat/235 HTTP/1.1”

but no info in log of FE\_PROXY…

And we don’t understand how to solve this. The

The config i have is

```auto
frontend core_fe
        timeout client 50000ms
        bind *:11975
        mode http
        option forwardfor
        default_backend core_be

```

and

```auto
backend core_be
   timeout connect 5000ms
   timeout check 5000ms
   timeout server 50000ms
   balance roundrobin
   mode http
   option http-server-close
   option httpchk GET /api/uptime
   http-check expect string true
   balance roundrobin
   #cookie SERVERID insert indirect nocache
   server core_be_server_1 XXX.XXX.XXX.24:11975 check inter 5s
   server core_be_server_2 XXX.XXX.XXX.10:11975 check inter 5s

```

we tried also this but no success

```auto
  acl is_websocket hdr(Upgrade) -i WebSocket
  acl is_websocket hdr_beg(Host) -i ws

```

Could you help us? thanks
