S
S
Stepan2021-04-06 18:23:23
Nginx
Stepan, 2021-04-06 18:23:23

How to proxy WebSockets through nginx?

Now I have a server with a websocket available at:
wss://site.ru:8443/

But for beauty, I would like to make access like this:
wss://site.ru/socket/

There is an article nginx.org in the nginx documentation /ru/docs/http/websocket.html

But ws is used here, and I need wss. How to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-04-06
@Stepashka20

The setup is similar, just add the rest of the necessary parameters to the server block listen ssl- a certificate, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question