2
0

nginx.proxy.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Note that this is for NGINX server, not SRS.
  2. worker_processes 1;
  3. events {
  4. worker_connections 1024;
  5. }
  6. http {
  7. include /etc/nginx/mime.types;
  8. server {
  9. listen 80;
  10. listen 443 ssl http2;
  11. server_name _;
  12. ssl_certificate /usr/local/srs/conf/server.crt;
  13. ssl_certificate_key /usr/local/srs/conf/server.key;
  14. # For SRS homepage, console and players
  15. # http://r.ossrs.net/console/
  16. # http://r.ossrs.net/players/
  17. location ~ ^/(console|players)/ {
  18. proxy_pass http://127.0.0.1:8080/$request_uri;
  19. }
  20. # For SRS streaming, for example:
  21. # http://r.ossrs.net/live/livestream.flv
  22. # http://r.ossrs.net/live/livestream.m3u8
  23. location ~ ^/.+/.*\.(flv|m3u8|ts|aac|mp3)$ {
  24. proxy_pass http://127.0.0.1:8080$request_uri;
  25. }
  26. # For SRS backend API for console.
  27. # For SRS WebRTC publish/play API.
  28. location ~ ^/(api|rtc)/ {
  29. proxy_pass http://127.0.0.1:1985$request_uri;
  30. }
  31. }
  32. }