Nginx Configuration for websocket: Error during WebSocket handshake: Unexpected response code: 403

Sergey Kandaurov pluknet at
Thu Jun 10 14:10:58 UTC 2021

> On 10 Jun 2021, at 16:04, raphy <nginx-forum at> wrote:
> Hi Sergey
> The nginx configuration I used for /xmpp-websocket location, taken from
> here: , follows the official nginx
> indications:
> If nginx doesn't support bootstrapping WebSockets with HTTP/2, what should 
> I do?

Are you actually using HTTP/2 ?
What if you try disabling http2 in the listen directive, to be sure.

"Unexpected response code: 403" could mean misconfiguration on backend side.

Sergey Kandaurov

More information about the nginx mailing list