Answer the question
In order to leave comments, you need to log in
How to set up nginx for websocket on ubuntu?
Hi friends! Need help asap.
Deploying a django project commit with chat on websocket and asyncio on ubuntu 16.04.
On the front I get this error:
WebSocket connection to 'wss://host_ip:port/session_key/get_path' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR
erver {
server_name project*;
listen 80;
listen 443;
ssl_certificate /home/dev/c.pem;
ssl_certificate_key /home/dev/k.key;
location = /favicon.ico {
alias project_path*/static/favicon.ico;
}
# location = /robots.txt {
# project_path*/static/robots.txt;
# }
location /static/ {
root project_path*/;
}
location /media/ {
root project_path*/;
}
location / {
include proxy_params;
proxy_pass project_path*/project*.sock;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
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