- перенос конфигов для web в его папку - префикс m3u-su- возвращён к на iptv- - уточнения по сборке docs и мелочи по остальным
68 lines
2.0 KiB
Plaintext
68 lines
2.0 KiB
Plaintext
server {
|
|
server_name iptv.local;
|
|
listen 80;
|
|
index index.html index.php;
|
|
# access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log warn;
|
|
add_header Access-Control-Allow-Origin '*';
|
|
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
|
|
add_header Access-Control-Allow-Headers "*";
|
|
add_header Access-Control-Allow-Credentials "true";
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_buffers 16 8k;
|
|
gzip_http_version 1.1;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
location = /docs {
|
|
return 301 /docs/;
|
|
}
|
|
|
|
location ^~ /docs/ {
|
|
proxy_pass http://docs:80/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_read_timeout 300;
|
|
proxy_connect_timeout 300;
|
|
proxy_send_timeout 300;
|
|
}
|
|
|
|
location / {
|
|
root /var/www/public;
|
|
try_files $uri $uri/ /index.php$is_args$args;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
root /var/www/public;
|
|
try_files $uri /index.php =404;
|
|
fastcgi_pass web:9000;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_hide_header X-Powered-By;
|
|
fastcgi_read_timeout 300;
|
|
proxy_read_timeout 300;
|
|
proxy_connect_timeout 300;
|
|
proxy_send_timeout 300;
|
|
include fastcgi_params;
|
|
location ~* \.(jpg|jpeg|gif|css|png|ttf|woff|svg|js|ico)$ {
|
|
access_log off;
|
|
expires max;
|
|
log_not_found off;
|
|
}
|
|
}
|
|
|
|
location ~* \.(jpg|jpeg|gif|css|png|ttf|woff|svg|js|ico)$ {
|
|
root /var/www/public;
|
|
access_log off;
|
|
expires max;
|
|
log_not_found off;
|
|
}
|
|
}
|