This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Description
My stack is like:
External World <-> nginx <-> rendora <-> nginx <-> daphne <-> django
I am using websocket connections. When I was doing
External World <-> nginx <-> daphne <-> django
It worked well. But when I implemented rendora and added another proxy to nginx, it does not work. Websocket connection fails while handshakes. My nginx conf is like below:
server {
listen 8000;
location / {
include proxy_params;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://unix:/home/ubuntu/myproject/myproject.sock;
}
}
server {
server_name mydomain;
charset utf-8;
location /static {
alias /home/ubuntu/myproject/apps/web-build/static;
}
location / {
include proxy_params;
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl; # managed by Certbot
...
}
So location / 443 port sends all requests to 127.0.0.1:3001 where rendora is listening. And rendora forward them to 127.0.0.1:8000 nginx proxy to connect to daphne unix socket.
Rendora works well except the websocket requests.
It would be helpful if there is a nginx configuration example.