Answer the question
In order to leave comments, you need to log in
Why doesn't nginx let me close the websocket?
Friends, colleagues, comrades! - I am writing shit code in python that uses WSS, the application itself uses gevent. Before all this, there is an nginx proxy with the following configuration:
server {
listen 80;
listen 443;
ssl on;
ssl_certificate /etc/letsencrypt/live/bookforker.tk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/bookforker.tk/privkey.pem; # managed by Certbot
server_name name.tk www.name.tk;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
proxy_pass https://localhost:5000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question