Closed puzzle9 closed 3 years ago
nginx.conf
location /live/ { proxy_pass http://127.0.0.1:19302/live/; }
lal.conf
"httpflv": { "enable": true, "sub_listen_addr": ":19302", "enable_https": false, "https_addr": ":4433", "https_cert_file": "./conf/cert.pem", "https_key_file": "./conf/key.pem", "gop_num": 2 },
访问地址
正常 http://127.0.0.1/live/20210323-1-151124.flv
502 仅存在于浏览器中 http://192.168.1.6/live/20210323-1-151124.flv
可是如果是手机端访问 都是正常的
错误日志
2021/03/23 15:48:04 [error] 183771#0: *15926 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.7, server: _, request: "GET /live/20210323-1-151124.flv HTTP/1.1", upstream: "http://127.0.0.1:19302/live/20210323-1-151124.flv", host: "192.168.1.7"
nginx version: nginx/1.18.0 lal version; v0.19.1 Google Chrome: 91.0.4449.6 firefox: 86.0.1
我怀疑是 cookie 的问题 同域下面 有cooke时候会出现502这种情况
cookie
cooke
cookie 字段是 session
session
最后 解决了
location /flv/ { proxy_set_header Cookie ""; proxy_pass http://127.0.0.1:17002/flv/; }
nginx.conf
lal.conf
访问地址
正常 http://127.0.0.1/live/20210323-1-151124.flv
502 仅存在于浏览器中 http://192.168.1.6/live/20210323-1-151124.flv
可是如果是手机端访问 都是正常的
错误日志