Former-commit-id: b45377de97a8b31ff23edb75695a5c4e15878ffc
Former-commit-id: da1c3d37154683b22e3fcf1b36aed1b43bae7348
1.0
wanggang 4 years ago
parent 9a7bed173d
commit 9abcaf4c6c

@ -16,6 +16,11 @@ http {
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server { server {
listen 0.0.0.0:81; listen 0.0.0.0:81;
server_name localhost; server_name localhost;
@ -58,18 +63,12 @@ http {
location ^~ /platform/ { location ^~ /platform/ {
proxy_pass http://platform/platform/; proxy_pass http://platform/platform/;
if ($http_upgrade ~* "close") {
break;
} }
location ^~ /platform/hub {
proxy_pass http://platform/platform/hub;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
} }
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
} }
} }

@ -16,16 +16,20 @@ http {
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server { server {
listen 0.0.0.0:80; listen 0.0.0.0:80;
server_name localhost; server_name localhost;
location /platform/ { location /platform/ {
proxy_pass http://host.docker.internal:8011/platform/; proxy_pass http://host.docker.internal:8011/platform/;
if ($http_upgrade ~* "close") {
break;
} }
location ^~ /platform/hub {
proxy_pass http://host.docker.internal:8011/platform/hub;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

@ -22,7 +22,7 @@ stats {
network 0; network 0;
disk sda sdb xvda xvdb; disk sda sdb xvda xvdb;
} }
rtc_server { rtc_server{
enabled on; enabled on;
listen 8000; listen 8000;
candidate *; candidate *;
@ -32,7 +32,8 @@ vhost __defaultVhost__ {
enabled on; enabled on;
bframe discard; bframe discard;
} }
tcp_nodelay on min_latency on; tcp_nodelay on
min_latency on;
play { play {
gop_cache off; gop_cache off;
queue_length 10; queue_length 10;
@ -60,7 +61,8 @@ vhost __defaultVhost__ {
} }
engine ff { engine ff {
enabled off; enabled off;
vfilter; vfilter {
}
vcodec libx264; vcodec libx264;
vbitrate 500; vbitrate 500;
vfps 25; vfps 25;
@ -69,12 +71,14 @@ vhost __defaultVhost__ {
vthreads 12; vthreads 12;
vprofile main; vprofile main;
vpreset medium; vpreset medium;
vparams; vparams {
}
acodec libfdk_aac; acodec libfdk_aac;
abitrate 70; abitrate 70;
asample_rate 44100; asample_rate 44100;
achannels 2; achannels 2;
aparams; aparams {
}
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
} }
} }

@ -16,6 +16,11 @@ http {
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream proxy { upstream proxy {
server gateway:81; server gateway:81;
} }
@ -35,10 +40,9 @@ http {
location ~* ^/(platform|dfs|live|video|influxdb|portainer|minio|mysqlui|influxui|phpredisadmin|srs)/ { location ~* ^/(platform|dfs|live|video|influxdb|portainer|minio|mysqlui|influxui|phpredisadmin|srs)/ {
proxy_pass http://proxy; proxy_pass http://proxy;
if ($http_upgrade ~* "close") {
break;
} }
location ^~ /platform/hub {
proxy_pass http://proxy;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

Loading…
Cancel
Save