Welcome! Log In Create A New Profile

Advanced

Websockets behind apache and nginx proxy, connection not upgrade

Posted by reddaemon87 
Websockets behind apache and nginx proxy, connection not upgrade
August 12, 2015 02:01AM
Hi! I have a problem. Apache listens on a white ip and proxies all requests /ssd on nginx that proxies requests /city-dashboard to another server with websockets. In apache config:

ProxyPass /ssd/ http://10.127.32.24
ProxyPassReverse /ssd/ http://10.127.32.24
nginx config: on nginx.conf:

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
include /etc/nginx/conf.d/*.conf;
on default.conf

location /city-dashboard/stream {
proxy_pass http://10.127.32.24:5000/stream;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
Request headers:

Connection: Upgrade
Upgrade: Websocket
Response headers:

Connection: close
Status Code 400 Bad Request
what am I doing wrong?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 266
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready