0

Что только не пробовал, не получается, сейчас пишет при открытии:

Error during WebSocket handshake: Unexpected response code: 404

worker_processes  1;  
error_log  logs/error.log debug; 
events {
    worker_connections  1024;
}
rtmp {
    server {
        listen 1935;
        application live {
            live on;
        }   
        application hls {
            live on;
            hls on;  
            hls_path temp/hls;  
            hls_fragment 8s;  
        }
    }
} 
http {
  map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
    }
     upstream websocket {
        server 192.168.0.142:82;
    }
     server {
        listen      81;

location / {
            proxy_pass http://websocket;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
        }

        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }  
        location /stat.xsl {
            root www;
        }       
        location /hls {  
           #server hls fragments  
            types{  
                application/vnd.apple.mpegurl m3u8;  
                video/mp2t ts;  
            }  
            alias temp/hls;  
            expires -1;  
        }  
    }
}
2
  • А пробовали подключаться напрямую к 192.168.0.142:82? Вебсокеты там точно рабочие?
    – andreymal
    26 сен 2016 в 7:56
  • @andreymal прошу прощения, но что вы имеете ввиду подключаться на прямую? Из адресной строки браузера? по 82 порту - "Не удается получить доступ к сайту"
    – Geri4
    26 сен 2016 в 8:22

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Посмотрите другие вопросы с метками или задайте свой вопрос.