V
V
vvgl2016-09-05 22:34:37
Nginx
vvgl, 2016-09-05 22:34:37

Setting up nginx for non-existent files and directories?

Please tell me what needs to be changed so that for all non-existent static files and directories a 404 page is issued, and not an index file, as it is now.
php files are processed by another location and the error works fine there ...

location / {
    root   /usr/share/nginx/www;
    try_files $uri $uri/ /index.php?$uri&$args;
    index  index.php;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-09-05
@vvgl

Remove /index.....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question