B
B
bubaley2021-08-18 12:54:01
Django
bubaley, 2021-08-18 12:54:01

Why doesn't nginx proxy websocket requests?

Hello everyone, why doesn't nginx proxy websocket requests for me, I looked in the logs, are there just http requests flying?

location / {
# redirect all HTTP traffic to localhost:8080
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_pass localhost:11111 ;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2021-08-18
@bubaley

https://nginx.org/ru/docs/http/websocket.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question