| worker_processes 1; |
| daemon off; |
| pid /tmp/nginx.pid; |
| error_log /dev/stderr info; |
|
|
| events { |
| worker_connections 1024; |
| } |
|
|
| http { |
| include /etc/nginx/mime.types; |
| default_type application/octet-stream; |
| access_log /dev/stdout; |
| sendfile on; |
|
|
| |
| client_body_temp_path /tmp/client_body; |
| proxy_temp_path /tmp/proxy_temp; |
| fastcgi_temp_path /tmp/fastcgi_temp; |
| uwsgi_temp_path /tmp/uwsgi_temp; |
| scgi_temp_path /tmp/scgi_temp; |
|
|
| server { |
| listen 7860; |
| server_name localhost; |
|
|
| |
| location / { |
| proxy_pass http://127.0.0.1:8000/stream.mp3; |
| |
| |
| |
| |
| add_header 'Access-Control-Allow-Origin' '*' always; |
| add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always; |
| add_header 'Access-Control-Allow-Headers' 'Range' always; |
| add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always; |
|
|
| |
| proxy_buffering off; |
| proxy_set_header Host $host; |
| chunked_transfer_encoding off; |
| proxy_read_timeout 86400; |
| } |
|
|
| |
| location /dev { |
| proxy_pass http://127.0.0.1:8888; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header Host $http_host; |
| proxy_http_version 1.1; |
| proxy_redirect off; |
| proxy_buffering off; |
| proxy_set_header Upgrade $http_upgrade; |
| proxy_set_header Connection "upgrade"; |
| proxy_read_timeout 86400; |
| } |
| } |
| } |
|
|