split stats and control to nginx port 18080
This commit is contained in:
parent
483a745d5d
commit
6c8fa63a9f
2 changed files with 32 additions and 16 deletions
|
@ -13,5 +13,6 @@
|
|||
|
||||
|
||||
### Powered by
|
||||
https://github.com/tiangolo/nginx-rtmp-docker
|
||||
https://github.com/zom-bi/zomstream
|
||||
|
||||
https://github.com/Abdisalan/blog-code-examples/tree/master/live-stream-part-3
|
||||
|
|
|
@ -28,6 +28,23 @@ http {
|
|||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
server {
|
||||
listen 18080;
|
||||
|
||||
location = /stat {
|
||||
rtmp_stat all;
|
||||
#rtmp_stat_stylesheet stat.xsl;
|
||||
#auth_basic Restricted Content; # Create a valid .htpasswd before uncommenting this.
|
||||
#auth_basic_user_file .htpasswd; # Create a valid .htpasswd before uncommenting this.
|
||||
|
||||
}
|
||||
|
||||
location = /control {
|
||||
rtmp_control all;
|
||||
#add_header Access-Control-Allow-Origin * always;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
|
||||
|
@ -37,23 +54,11 @@ http {
|
|||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
|
||||
location /control {
|
||||
rtmp_control all;
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
location /admin {
|
||||
proxy_pass http://frontend:5001;
|
||||
include /etc/nginx/mime.types;
|
||||
}
|
||||
|
||||
location /stats {
|
||||
rtmp_stat all;
|
||||
#rtmp_stat_stylesheet stat.xsl;
|
||||
#auth_basic Restricted Content; # Create a valid .htpasswd before uncommenting this.
|
||||
#auth_basic_user_file .htpasswd; # Create a valid .htpasswd before uncommenting this.
|
||||
}
|
||||
|
||||
#location /admin {
|
||||
# proxy_pass http://frontend:5001;
|
||||
# include /etc/nginx/mime.types;
|
||||
#}
|
||||
|
||||
location /hls {
|
||||
types {
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
|
@ -81,6 +86,16 @@ http {
|
|||
}
|
||||
}
|
||||
|
||||
location /flv {
|
||||
flv_live on;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue