Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@nginxrtmp nginx]# cat nginx.conf
- user nginx;
- worker_processes auto;
- error_log /var/log/nginx/error-debug.log debug;
- ### error_log /var/log/nginx/error.log;
- pid /run/nginx.pid;
- worker_rlimit_nofile 131072;
- # Load dynamic modules. See /usr/share/nginx/README.dynamic.
- include /usr/share/nginx/modules/*.conf;
- events {
- worker_connections 10000;
- }
- # Настройка RTMP модуля
- rtmp_auto_push on;
- rtmp {
- wait_key on;
- wait_video on;
- publish_notify on;
- # Данные об RTMP командах
- log_format rtmpfull 'addr $remote_addr, time [$time_local], cmd $command, app "$app", name "$name", args "$args", '
- '- recieved!!! $bytes_received, sent!!! $bytes_sent, pageurl "$pageurl", flashver "$flashver", sesstimeout ($session_readable_time), '
- '- conection $connection, $msec $time_local $session_time '
- '- swfurl $swfurl, turl $tcurl';
- access_log /var/log/nginx/access.log rtmpfull;
- # Сервер RTMP модуля
- server {
- listen 2019;
- chunk_size 4096;
- # RTMP приложение для стрима
- application stream {
- live on;
- }
- }
- }
- http {
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main buffer=16k;
- sendfile off;
- tcp_nopush on;
- aio on;
- directio 512;
- default_type application/octet-stream;
- types_hash_max_size 2048;
- server_names_hash_bucket_size 128;
- server {
- listen 8088;
- location / {
- # Disable cache
- add_header 'Cache-Control' 'no-cache';
- # CORS setup
- add_header 'Access-Control-Allow-Origin' '*' always;
- add_header 'Access-Control-Expose-Headers' 'Content-Length';
- # allow CORS preflight requests
- if ($request_method = 'OPTIONS') {
- add_header 'Access-Control-Allow-Origin' '*';
- add_header 'Access-Control-Max-Age' 1728000;
- add_header 'Content-Type' 'text/plain charset=UTF-8';
- add_header 'Content-Length' 0;
- return 204;
- }
- types {
- application/dash+xml mpd;
- application/vnd.apple.mpegurl m3u8;
- video/mp2t ts;
- }
- root /mnt/;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement