Answer the question
In order to leave comments, you need to log in
How to find out what is the reason for 404 location in nginx?
There is a config
server {
listen 80;
root /var/www/home;
access_log /var/www/home/access.log;
error_log /var/www/home/error.log;
index index.php index.html index.htm;
server_name home;
location / {
try_files $uri $uri/ /index.php?$args; #if doesn't exist, send it to index.php
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "error_log=/var/www/home/php_errors.log";
}
location ~* /Admin {
allow 127.0.0.1;
deny all;
}
}
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