I'm trying to configure o proxy for my website that is using webrtc kurento media server. Everything works except that i can't connect to media server when using nginx proxy.
Here my nginx configuration
server {
listen 80;
server_name xxx.xxx.xxx.xxx;
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
}
server {
listen 443;
ssl on;
ssl_certificate crt.crt;
ssl_certificate_key key.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
server_name xxx.xxx.xxx.xxx;
proxy_set_header X-Forwarded-For $remote_addr;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
server_tokens off;
location /one2one {
proxy_pass https://127.0.0.1/one2one;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
proxy_pass https://127.0.0.1:9000/;
}
}
and the error i get is the following
WebSocket connection to 'wss://xxx.xxx.xxx.xxx/one2one' failed: Error during WebSocket handshake: Unexpected response code: 500