Answer the question
In order to leave comments, you need to log in
All internal pages give 404 error after switching to nginx, is there something wrong with the setting?
Prior to this, there were no problems with Apache. Now on nginx, only the main page is available, the rest are 404 errors.
Here is the nginx config:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www;
index index.php index.html index.htm index.nginx-debian.html;
server_name site.ru;
location / {
try_files $uri $uri/ = 404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question