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

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


> On 10 Jun 2021, at 16:04, raphy <nginx-forum at forum.nginx.org> wrote:
> 
> Hi Sergey
> 
> The nginx configuration I used for /xmpp-websocket location, taken from
> here: https://prosody.im/doc/websocket , follows the official nginx
> indications: https://nginx.org/en/docs/http/websocket.html
> 
> 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