2024/05/04 20:14:52 [error] 151186#151186: *5052 "/var/www/www-root/data/www/site.ru/new/index.php" is not found (2: No such file or directory), client: 11.11.11.11, server: site.ru, request: "GET /new/ HTTP/1.1", host: "11.11.11.11", referrer: "https://11.11.11.11/"
server {
server_name site.ru www.site.ru;
charset off;
index index.php index.html;
disable_symlinks if_not_owner from=$root_path;
include /etc/nginx/vhosts-includes/*.conf;
include /etc/nginx/vhosts-resources/site.ru/*.conf;
access_log /var/www/httpd-logs/site.ru.access.log;
error_log /var/www/httpd-logs/site.ru.error.log notice;
ssi on;
set $root_path /var/www/www-root/data/www/site.ru;
root $root_path;
gzip on;
gzip_comp_level 5;
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 image/svg+xml;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|webp|woff|woff2)$ {
expires 24h;
}
}
return 301 https://$host:443$request_uri;
listen 11.11.11.11:80;
location @php {
include /etc/nginx/vhosts-resources/site.ru/dynamic/*.conf;
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@site.ru";
fastcgi_pass unix:/var/www/php-fpm/1.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
include fastcgi_params;
}
}
server {
server_name site.ru www.site.ru;
ssl_certificate "/var/www/httpd-cert/www-root/site.ru_le1.crt";
ssl_certificate_key "/var/www/httpd-cert/www-root/site.ru_le1.key";
ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
charset off;
index index.php index.html;
disable_symlinks if_not_owner from=$root_path;
include /etc/nginx/vhosts-includes/*.conf;
include /etc/nginx/vhosts-resources/site.ru/*.conf;
access_log /var/www/httpd-logs/site.ru.access.log;
error_log /var/www/httpd-logs/site.ru.error.log notice;
ssi on;
set $root_path /var/www/www-root/data/www/site.ru;
root $root_path;
gzip on;
gzip_comp_level 5;
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 image/svg+xml;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|webp|woff|woff2)$ {
expires 24h;
}
}
listen 11.11.11.11:443 ssl;
location @php {
include /etc/nginx/vhosts-resources/site.ru/dynamic/*.conf;
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@site.ru";
fastcgi_pass unix:/var/www/php-fpm/1.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
include fastcgi_params;
}
}
server { }
где listen 11.11.11.11:443 ssl;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
try_files $uri $uri/ /index.php?$args;
location / {
try_files $uri $uri/ /index.php?$args;
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
location /wp-admin/admin-ajax.php/ {
try_files /wp-admin/admin-ajax.php/ /wp-admin/admin-ajax.php;
}
.php/
, то в конфиге location ~ [^/]\.ph(p\d*|tml)$
$
location / {
try_files $uri $uri/ /index.php?$args;
location ~ [^/]\.ph(p\d*|tml) {
try_files /does_not_exists @php;
}
location @php {
try_files $uri =404;
на try_files $fastcgi_script_name =404;