1 Star 0 Fork 2

zhaoxq02/nginx-rtmp

forked from binave/nginx-rtmp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
stream.conf 2.28 KB
一键复制 编辑 原始数据 按行查看 历史
root 提交于 2022-01-10 23:31 . fix move
log_format json '{"@timestamp":"$time_iso8601","host":"$server_addr","client":"$remote_addr","protocol":"$protocol",'
'"received":$bytes_received,"send":$bytes_sent,'
'"backend":"$upstream_addr","status":"$status"}';
# map $ssl_preread_server_name $name {
# backend.example.com 127.0.0.1:443;
# default 127.0.0.1:80;
# }
#
# server {
# listen 8080;
# proxy_pass $name;
# ssl_preread on;
#
# # access_log /var/log/nginx/stream.access.log json;
# }
# map $ssl_preread_alpn_protocols $proxy {
# ~\bh2\b 172.17.0.1:8001;
# ~\bhttp/1.1\b 127.0.0.1:443;
# ~\bxmpp-client\b 172.17.0.1:8002;
# }
#
# server {
# listen 8000;
# proxy_pass $proxy;
# ssl_preread on;
#
# # access_log /var/log/nginx/stream.access.log json;
# }
# upstream tls {
# server 127.0.0.1:443;
# }
#
# map $proxy_protocol_addr $dynamic {
# "10.0.0.1" 172.17.0.1:22;
# default 127.0.0.1:80;
# }
#
# server {
# listen 8822 proxy_protocol;
# proxy_ssl off;
# proxy_pass $dynamic;
# proxy_timeout 10m;
# }
#
# map $ssl_preread_protocol $upstream {
# "" 127.0.0.1:8822;
# "TLSv1.0" tls;
# "TLSv1.1" tls;
# "TLSv1.2" tls;
# "TLSv1.3" tls;
# default tls;
# }
#
# server {
# listen 8443;
# # listen 10.0.0.1:8443;
# proxy_pass $upstream;
# proxy_protocol on;
# ssl_preread on;
#
# # access_log /var/log/nginx/stream.access.log json;
# }
upstream debug {
# hash $remote_addr consistent;
# server 172.17.0.1:8456 max_fails=3 fail_timeout=30s;
server 172.17.0.1:8457 max_fails=3 fail_timeout=30s;
# server unix:/tmp/backend.socket;
}
server{
listen 8457;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass debug;
# proxy_pass unix:/tmp/stream.socket;
# access_log /var/log/nginx/stream.access.log json;
}
# server{
# listen 8081-8086;
# proxy_connect_timeout 1s;
# proxy_timeout 3s;
# proxy_pass 10.0.0.2:$server_port;
# }
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaoxq02/nginx-rtmp.git
[email protected]:zhaoxq02/nginx-rtmp.git
zhaoxq02
nginx-rtmp
nginx-rtmp
develop

搜索帮助