You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.6 KiB

  1. daemon on;
  2. worker_processes 50;
  3. #error_log /dev/stdout warn;
  4. error_log /var/log/nginx/error.log error;
  5. events {
  6. worker_connections 1024;
  7. }
  8. http {
  9. include mime.types;
  10. default_type application/octet-stream;
  11. # See http://licson.net/post/optimizing-nginx-for-large-file-delivery/ for more detail
  12. # This optimizes the server for HLS fragment delivery
  13. sendfile off;
  14. #tcp_nopush on;
  15. keepalive_timeout 65;
  16. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  17. '$status $body_bytes_sent "$http_referer" '
  18. '"$http_user_agent" "$http_x_forwarded_for"';
  19. #access_log /dev/stdout combined;
  20. # ssl_ciphers HIGH:!aNULL:!MD5;
  21. # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  22. # ssl_session_cache shared:SSL:10m;
  23. # ssl_session_timeout 10m;
  24. server {
  25. listen 80;
  26. # Uncomment these lines to enable SSL.
  27. # Update the ssl paths with your own certificate and private key.
  28. # listen 443 ssl;
  29. # ssl_certificate /opt/certs/example.com.crt;
  30. # ssl_certificate_key /opt/certs/example.com.key;
  31. location / {
  32. root /var/www;
  33. try_files $uri $uri/ /index.html;
  34. index index.html;
  35. }
  36. location /v1/ {
  37. proxy_set_header X-Forwarded-Proto $scheme;
  38. proxy_set_header X-Forwarded-Port $server_port;
  39. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  40. proxy_set_header Upgrade $http_upgrade;
  41. proxy_set_header Connection "upgrade";
  42. proxy_set_header Host $host;
  43. proxy_pass ${API_SERVER} ;
  44. }
  45. }
  46. }