nginx.conf 892 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. worker_processes 1;
  2. error_log logs/error.log debug;
  3. events {
  4. worker_connections 1024;
  5. }
  6. rtmp {
  7. server {
  8. listen 1935;
  9. application live {
  10. live on;
  11. }
  12. application hls {
  13. live on;
  14. hls on;
  15. hls_path temp/hls;
  16. hls_fragment 8s;
  17. }
  18. }
  19. }
  20. http {
  21. server {
  22. listen 8080;
  23. location / {
  24. root html;
  25. }
  26. location /stat {
  27. rtmp_stat all;
  28. rtmp_stat_stylesheet stat.xsl;
  29. }
  30. location /stat.xsl {
  31. root html;
  32. }
  33. location /hls {
  34. #server hls fragments
  35. types{
  36. application/vnd.apple.mpegurl m3u8;
  37. video/mp2t ts;
  38. }
  39. alias temp/hls;
  40. expires -1;
  41. }
  42. }
  43. }