1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/binave-nginx-rtmp

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
http.conf 6.9 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
root Отправлено 10.01.2022 18:31 382dc90
client_max_body_size 50m;
# # http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size
# client_header_buffer_size 128k;
# large_client_header_buffers 4 128k;
proxy_buffer_size 512k;
proxy_buffers 8 512k;
proxy_busy_buffers_size 512k;
proxy_temp_file_write_size 512k;
log_format json '{"@timestamp":"$time_iso8601","host":"$server_addr","client":"$remote_addr","size":$body_bytes_sent,'
'"responsetime":$request_time,"url":"$uri","referer":"$http_referer",'
'"agent":"$http_user_agent","backend":"$upstream_addr","status":"$status"}';
# upstream to_http {
# server 10.0.0.2:8080;
# }
#
# upstream to_https {
# server 10.0.0.2:8443;
# }
#
# upstream downloadapi {
# # hash $http_<header> consistent;
# # hash $proxy_protocol_addr consistent; # proxy_protocol
# server 172.17.0.1:8088;
# server 192.168.1.2:8088;
# server 192.168.1.3:8088;
# keepalive 64;
# }
# # perl_set $rename_dest '
# # sub {
# # my $r = shift;
# # my $encode_url = $r->header_in(destination);
# # $encode_url =~ s/^https/http/;
# # $encode_url =~ s/%25/%/g;
# # return $encode_url;
# # }
# # ';
#
# map $http_destination $move_destination {
# ~^https://(.+) http://$1;
# default $http_destination;
# }
server {
listen 80;
listen [::]:80;
# listen 443 ssl http2;
# listen 443 ssl http2 proxy_protocol; # for stream realip
# listen [::]:443 ssl http2;
server_name localhost;
# error_page 497 301 https://$http_host$request_uri; # $host + ':$port' = $http_host
# if ($ssl_protocol = "") {
# return 301 https://$host$request_uri;
# }
# if ($request_method ~* OPTIONS|TRACE) {
# return 403;
# }
# ssl_certificate /etc/ssl/letsencrypt/live/$ssl_server_name/fullchain.pem;
# ssl_certificate_key /etc/ssl/letsencrypt/live/$ssl_server_name/privkey.pem;
add_header X-Frame-Options SAMEORIGIN;
#charset koi8-r;
#access_log /var/log/nginx/http.access.log json;
location / {
if (-d $request_filename) {
rewrite ^/(.*)([^/])$ $scheme://$host/$1$2/ permanent;
}
root /var/run/www;
index index.html index.htm;
}
# location / {
# root /var/run/www;
# index index.html;
# try_files $uri $uri/index.html $uri.html @to;
# # gzip_static on;
# }
#
# location @to {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# # proxy_set_header Host $http_host;
# proxy_set_header X-Nginx-Proxy true;
#
# # websocket
# proxy_set_header Upgrade $http_upgrade;
# proxy_http_version 1.1;
# proxy_set_header Connection "upgrade";
#
# proxy_pass $scheme://to_$scheme;
# }
# location ~ ^/prefix-(suffix-1|suffix-2)/ {
# root /data;
# autoindex off;
# if (-d $request_filename) {
# rewrite [^/]$ $scheme://$http_host$uri/ permanent;
# }
# }
# location ^~ /upstream/ {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# # proxy_set_header Host $http_host;
# proxy_set_header X-Nginx-Proxy true;
# proxy_set_header Connection "";
# proxy_pass http://upstream;
# }
# location ^~ /uml/ {
# proxy_set_header Accept-Encoding ''; # no compression
# sub_filter_types *;
# sub_filter_once off;
# sub_filter '="/' '="/uml/';
# sub_filter 'http://10.0.0.2:8008/' 'https://$host/uml/';
#
# # rewrite / /info redirect;
#
# # # https://localhost/param -> http://10.0.0.2:8008/param
# # proxy_pass http://10.0.0.2:8008;
#
# # # https://localhost/param -> http://10.0.0.2:8008
# proxy_pass http://10.0.0.2:8008/;
#
# proxy_redirect /new/ /uml/new/; # replace response header : 'location' or 'refresh': /new/ -> /uml/new/
#
# # proxy_redirect http:// https://;
# }
# location / {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#
# # must be in the PEM format
# proxy_ssl_trusted_certificate /etc/ssl/certs/backend.example.com/trusted_ca_cert.crt;
# proxy_ssl_verify on;
# proxy_ssl_verify_depth 2;
#
# proxy_set_header X-Nginx-Proxy true;
# proxy_set_header Connection "";
# proxy_pass https://backend.example.com;
# }
# location ^~ /svn_or_webdav {
#
# # set $move_method_dest $http_destination;
# # if ($http_destination ~ "^https://(.+)") {
# # # set $move_method_dest http://$1;
# # set $move_method_dest $rename_dest;
# # }
# # proxy_set_header Destination $move_method_dest;
#
# proxy_buffering off;
# proxy_read_timeout 600;
# proxy_send_timeout 600;
#
# proxy_set_header Destination $move_destination;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# proxy_set_header X-Nginx-Proxy true;
# proxy_set_header Connection "";
# proxy_pass http://subversion.example.com;
# }
# location ~ ^/sub/ {
# # # https://localhost/sub/path -> /var/run/www/path
# # alias /var/run/www/;
#
# # https://localhost/sub/path -> /var/run/www/sub/path
# root /var/run/www/;
# }
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/run/www;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
#! XJAR_ROOTS= XJAR_INCLUDE= XJAR_IGNORE=;
}
# # HTTP can be used for accessing RTMP stats
# server {
#
# listen 8080;
#
# # This URL provides RTMP statistics in XML
# location /stat {
# rtmp_stat all;
#
# # Use this stylesheet to view XML as web page
# # in browser
# rtmp_stat_stylesheet stat.xsl;
# }
#
# location /stat.xsl {
# # XML stylesheet to view RTMP stats.
# # Copy stat.xsl wherever you want
# # and put the full directory path here
# root /path/to/stat.xsl/;
# }
#
# location /hls {
# # Serve HLS fragments
# types {
# application/vnd.apple.mpegurl m3u8;
# video/mp2t ts;
# }
# root /tmp;
# add_header Cache-Control no-cache;
# }
#
# location /dash {
# # Serve DASH fragments
# root /tmp;
# add_header Cache-Control no-cache;
# }
# }

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/binave-nginx-rtmp.git
git@api.gitlife.ru:oschina-mirror/binave-nginx-rtmp.git
oschina-mirror
binave-nginx-rtmp
binave-nginx-rtmp
develop