[Freeswitch-users] WebSocket behind NGINX
Anton
anton.vojlenko at gmail.com
Sat Jan 30 22:20:07 MSK 2016
Hello All,
I have to proxy all websocket requests though a nginx server. Right now
I am using next configuration:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443;
server_name wss.somedomain.com.ua;
ssl on;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/private.key;
location / {
proxy_pass http://127.0.0.1:5066;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400s;
}
access_log /var/log/nginx/wss_access;
error_log /var/log/nginx/wss_error debug;
}
I dumped traffic from nginx and found out that "switching protocol"
phrase was successful but INVITE message from my browser in pending state.
Maybe FreeSWITCH wants real IP not loopback? Who have faced with similar
problem?
BR,
Anton
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list