server { server_name v.yurecnt.ru; root /home/www/virtual-nt.ru/virt2; index index.php; client_max_body_size 800m; location / { try_files $uri $uri/ =404; error_page 404 /404/; rewrite ^/([^/]*)\.html$ /?mod=page&id=$1 break; rewrite ^/robots.txt /?mod=qrobot break; rewrite ^/sitemap.xml$ /?mod=qsitemap break; rewrite /css.css /?mod=css break; rewrite ^/([^/]*)/([^/]*)$ /?mod=$1&id=$2; } location /img {} location /api/soft {} location /files {} location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 32k; fastcgi_buffers 4 32k; fastcgi_index index.php; include fastcgi_params; fastcgi_cache_valid 200 60m; #client_body_timeout 1200; #client_header_timeout 600; } location ~* ^.+.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js|woff|woff2|ttf)$ { expires 181d; } listen 80; # managed by Certbot access_log /var/log/nginx/v.log; error_log /var/log/nginx/v-err.log; }