nginx 配置增加了try_files $uri $uri.php$is_args$args;
一行后,直接访问域名就报错误403 Forbidden,去掉这行才可以,我要保留try_files的配置,请问该如何修改?
server
{
listen 80;
server_name www.aaa.com;
index index.html index.htm index.php default.html default.htm;
root /home/wwwroot/app_htx;
include none.conf;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
location / {
try_files $uri $uri.php$is_args$args;
}
access_log /home/wwwlogs/access.log;
}
目前估计是去找.php这个文件了,没有找到就报错了,如何修改配置,判断url只有域名或者目录情况就不执行该配置
参考一下https://segmentfault.com/q/10...