Внедрение документации
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
server {
|
||||
server_name iptv.local;
|
||||
listen 80;
|
||||
root /var/www/public;
|
||||
index index.php;
|
||||
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;
|
||||
@@ -10,15 +16,29 @@ server {
|
||||
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 ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
|
||||
access_log off;
|
||||
expires max;
|
||||
log_not_found off;
|
||||
|
||||
location = /docs {
|
||||
return 301 /docs/;
|
||||
}
|
||||
|
||||
location ^~ /docs/ {
|
||||
alias /usr/share/nginx/html/doc-files/;
|
||||
index index.html;
|
||||
# access_log /var/log/nginx/docs_access.log;
|
||||
error_log /var/log/nginx/docs_error.log warn;
|
||||
location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
}
|
||||
|
||||
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)(/.+)$;
|
||||
@@ -29,5 +49,17 @@ server {
|
||||
fastcgi_read_timeout 300;
|
||||
proxy_read_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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user