Nginx-无法访问没有.php的文件

Nginx-无法访问没有.php的文件,php,nginx,Php,Nginx,我不知道为什么没有.php扩展名我的页面是不可访问的。出什么事了?然而,它在我的另一个网站上工作 当我把try_文件$uri$uri/$uri.html$uri.php?$query_字符串对于没有扩展名的.php文件来说没问题,但是我的网站创建了“伪造文件夹/页面”,比如mywebsite.lol/category/example,现在无法访问(404) 这是我的服务器{}块配置 # Gestion www server { # Port listen 80; # Ho

我不知道为什么没有.php扩展名我的页面是不可访问的。出什么事了?然而,它在我的另一个网站上工作

当我把
try_文件$uri$uri/$uri.html$uri.php?$query_字符串对于没有扩展名的.php文件来说没问题,但是我的网站创建了“伪造文件夹/页面”,比如mywebsite.lol/category/example,现在无法访问(404)

这是我的
服务器{}
块配置

# Gestion www
server {
    # Port
    listen 80;
    # Hostname
    server_name test.mywebsite.lol;
    # Logs
    access_log /var/log/nginx/test.mywebsite.lol.access.log;
    error_log /var/log/nginx/test.mywebsite.lol.error.log;
    root /home/mywebsite/www/test;
    # Fichier a executer par defaut (en ordre)
    index index.html index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    # pass the PHP scripts to FastCGI server listening on the php-fpm socket
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\. {
        deny all;
    }
}

你的日志是什么<代码>尾部-t/var/log/nginx/error.log
我什么都没有。。。当我试图进入一个页面时,我只是在索引页面上重定向。只需检查您的日志文件。您使用的是哪台服务器?当然:p Debian 7,VPS(ovh)。error.log或test.mywebsite.error.lol.log上没有任何内容:/-我不知道为什么我会被重定向如果你尝试了这个怎么办你的日志是什么<代码>尾部-t/var/log/nginx/error.log我什么都没有。。。当我试图进入一个页面时,我只是在索引页面上重定向。只需检查您的日志文件。您使用的是哪台服务器?当然:p Debian 7,VPS(ovh)。error.log或test.mywebsite.error.lol.log上没有任何内容:/-我不知道为什么我会被重定向如果你尝试了这个怎么办