nginx对php不友好.需要在nginx的conf开启pathinfo.conf
如下是我的conf:
server
{
listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;
server_name 0.0.0.0;
index index.html index.htm index.php;
root /home/wwwroot/default;
#error_page 404 /404.html;
#这句才是关键我是lnmp.org
include enable-php-pathinfo.conf;
location /nginx_status
{
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /home/wwwlogs/access.log;
}
© 著作权归作者所有
文章评论(0)