И еще есть проблема с настройкой ЧПУ, вроде всё настроил, но не работает страница 404 в preste, а показывает:
[Debug] This page has moved
Please use the following URL instead: https://hanmart.ru/zubnaya-pasta/23-dental-clinic-2080-cheong-en-cha-vostochnyj-chaj-zubnaya-pasta-130g-8801046979280.html
Я понимаю где копать, но сам не смог понять что не так. У меня было:
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
но с этим кодом не работает ЧПУ
Сейчас у меня:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_read_timeout 9000;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
На сайте престы:
location ~ \.php$ {
try_files $uri =404;
fastcgi_keep_conn on;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000; # When using TCP
#fastcgi_pass unix:/var/run/php/php-fpm.sock; # When using unix sockets
}
Но как только я добавляю "try_files $uri =404;" или "try_files $uri $uri/ =404;" сайт умирает.
Хелп, что не так?