# WebSocket not working on Server behind reverse proxy

**URL:** <https://forum.mattermost.com/t/websocket-not-working-on-server-behind-reverse-proxy/14506>\
**Category:** Troubleshooting\
**Created:** [November 24, 2022, 5:29pm UTC](https://forum.mattermost.com/t/websocket-not-working-on-server-behind-reverse-proxy/14506 "2022-11-24T17:29:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![salvuccicarlos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/salvuccicarlos/32/6103_2.png) [@salvuccicarlos](https://forum.mattermost.com/u/salvuccicarlos)\
**Post date:** [November 24, 2022, 5:29pm UTC](https://forum.mattermost.com/t/websocket-not-working-on-server-behind-reverse-proxy/14506/1 "2022-11-24T17:29:03Z")

</div>

Hello, erveryone.

I’ve just finished intalling mattermost on a server running CentOS 7 and I’m having some trouble with websockets.

I have two servers, server A and server B. My main website is hosted on server A while Mattermost is hosted on server B. Both servers are connected to the same public IP.

In order to use Mattermost with a subdomain, I’ve created a website with an NGINX reverse proxy rule that sends the user to my server B’s internal IP. Mattermost works correctly but websockets don’t.

If I connect directly to Mattermost using the server B’s IP websockets works fine.

Any idea of how does the NGINX’s reverse proxy should look like so that I can use Mattermost with my subdomain?

Thanks!

---

<div class="post-metadata">

**Author:** ![salvuccicarlos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/salvuccicarlos/32/6103_2.png) [@salvuccicarlos](https://forum.mattermost.com/u/salvuccicarlos)\
**Post date:** [November 25, 2022, 1:42am UTC](https://forum.mattermost.com/t/websocket-not-working-on-server-behind-reverse-proxy/14506/2 "2022-11-25T01:42:06Z")

</div>

I could solve it! If anyone is having this problem check out this post: [How to use Nginx as a Reverse proxy for HTTPS and WSS - Self Signed Certificates and Trusted Certificates](https://www.linkedin.com/pulse/how-use-nginx-reverse-proxy-https-wss-self-signed-ramos-da-silva/)  
on Step 6 - Configure Support to WebSockets is the key for the NGINX reverse proxy configuration.

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [November 26, 2022, 11:43am UTC](https://forum.mattermost.com/t/websocket-not-working-on-server-behind-reverse-proxy/14506/3 "2022-11-26T11:43:26Z")

</div>

Hi and welcome to the Mattermost forums!

This is also mentioned in the [official documentation](https://docs.mattermost.com/install/config-proxy-nginx.html). Please check it out, there might be other Mattermost specific configurations you may need.
