Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #user  nobody;
  2. worker_processes auto;
  3.  
  4. #error_log  logs/error.log;
  5. #error_log  logs/error.log  notice;
  6. #error_log  logs/error.log  info;
  7.  
  8. #pid        logs/nginx.pid;
  9.  
  10.  
  11. events {
  12.     worker_connections  1024;
  13. }
  14.  
  15.  
  16. http {
  17.     sendfile off;
  18.     tcp_nopush on;
  19.     aio on;
  20.     directio 512;
  21.     default_type application/octet-stream;
  22.  
  23.     server {
  24.         listen 8080;
  25.         server_name  mondomaine.fr;
  26.  
  27.         location / {
  28.             add_header 'Cache-Control' 'no-cache';
  29.             add_header 'Access-Control-Allow-Origin' '*' always;
  30.             add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
  31.             add_header 'Access-Control-Allow-Headers' 'Range';
  32.             if ($request_method = 'OPTIONS') {
  33.                 add_header 'Access-Control-Allow-Origin' '*';
  34.                 add_header 'Access-Control-Allow-Headers' 'Range';
  35.                 add_header 'Access-Control-Max-Age' 1728000;
  36.                 add_header 'Content-Type' 'text/plain charset=UTF-8';
  37.                 add_header 'Content-Length' 0;
  38.                 return 204;
  39.             }
  40.             types {
  41.                 application/dash+xml mpd;
  42.                 application/vnd.apple.mpegurl m3u8;
  43.                 video/mp2t ts;
  44.             }
  45.             root /var/lib/streaming/;
  46.         }
  47.  
  48.     }
  49.  
  50. }
  51.  
  52. rtmp {
  53.     server {
  54.         listen 1935;
  55.         chunk_size 4000;
  56.         application live {
  57.             live on;
  58.             hls on;
  59.             hls_path /var/lib/streaming/hls/;
  60.             hls_fragment 3s;
  61.             hls_playlist_length 60s;
  62.             deny play all;
  63.         }
  64.     }
  65. }