nginx-cuda.conf 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. daemon off;
  2. error_log /dev/stdout info;
  3. events {
  4. worker_connections 1024;
  5. }
  6. rtmp {
  7. server {
  8. listen ${RTMP_PORT};
  9. chunk_size 4000;
  10. application stream {
  11. live on;
  12. exec_push ${EXECPUSH};
  13. }
  14. application hls {
  15. live on;
  16. hls on;
  17. hls_fragment_naming system;
  18. hls_fragment 5;
  19. hls_playlist_length 10;
  20. hls_path /opt/data/hls;
  21. hls_nested on;
  22. ${HLSVARIANTS}
  23. }
  24. }
  25. }
  26. http {
  27. root /www/static;
  28. sendfile off;
  29. tcp_nopush on;
  30. server_tokens off;
  31. access_log /dev/stdout combined;
  32. # Uncomment these lines to enable SSL.
  33. # ssl_protocols TLSv1.2 TLSv1.3;
  34. # ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
  35. # ssl_prefer_server_ciphers off;
  36. # ssl_session_cache shared:SSL:10m;
  37. # ssl_session_timeout 1d;
  38. server {
  39. listen ${HTTP_PORT};
  40. # Uncomment these lines to enable SSL.
  41. # Update the ssl paths with your own certificate and private key.
  42. # listen ${HTTPS_PORT} ssl;
  43. # ssl_certificate /opt/certs/example.com.crt;
  44. # ssl_certificate_key /opt/certs/example.com.key;
  45. location /hls {
  46. types {
  47. application/vnd.apple.mpegurl m3u8;
  48. video/mp2t ts;
  49. }
  50. root /opt/data;
  51. add_header Cache-Control no-cache;
  52. add_header Access-Control-Allow-Origin *;
  53. }
  54. location /live {
  55. alias /opt/data/hls;
  56. types {
  57. application/vnd.apple.mpegurl m3u8;
  58. video/mp2t ts;
  59. }
  60. add_header Cache-Control no-cache;
  61. add_header Access-Control-Allow-Origin *;
  62. }
  63. location /stat {
  64. rtmp_stat all;
  65. rtmp_stat_stylesheet stat.xsl;
  66. }
  67. location /stat.xsl {
  68. root /www/static;
  69. }
  70. location /crossdomain.xml {
  71. default_type text/xml;
  72. expires 24h;
  73. }
  74. }
  75. }