server {
root /usr/share/nginx/html;
index index.php;
server_name site.ru www.site.ru;
client_max_body_size 10m;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
error_log /var/log/nginx/error.log;
access_log off;
if ($args ~* "(attachment_id|eval|duplicate|base64|substring|preg_replace|create_function)") {
return 403;
}
location /image/ {
location ~ \.(png|jpg)$ {
error_page 404 /image/noimage.png;
}
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files fid $uri $uri/ /index.php?$args;
}
location ~* ^/(\.htaccess|xmlrpc\.php|license\.txt|readme\.html)$ {
return 404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
location / {
try_files fid $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Поэтому интересно было услышать мнение именно по вырезанию html и сохранению их в JS, насколько это оправдано, и не возникнет ли так что это займет еще больше ресурсов у клиента ))