Files
mymovies/nginx.conf
T

30 lines
806 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Каталог и обложки: нужен CORS для WebView Lampa
location = /catalog.json {
add_header Access-Control-Allow-Origin * always;
default_type application/json;
try_files /catalog.json =404;
}
location /covers/ {
add_header Access-Control-Allow-Origin * always;
try_files $uri =404;
}
# Торренты torrserver забирает сам (CORS не нужен), но отдадим тоже
location /torrents/ {
add_header Access-Control-Allow-Origin * always;
types { application/x-bittorrent torrent; }
try_files $uri =404;
}
location / {
try_files $uri $uri/ =404;
}
}