server { listen 7860; server_name localhost; root /usr/share/nginx/html; index index.html; location / { try_files $uri $uri/ =404; } location /files/ { autoindex on; autoindex_exact_size off; autoindex_localtime on; types { text/plain txt; application/vnd.apple.mpegurl m3u; } add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; add_header Access-Control-Allow-Headers 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; } location = /favicon.ico { log_not_found off; access_log off; } }