标签:
默认的lnmp没有开启pathinfo模式,但很多框架需要用到。
cd /usr/local/nginx/conf
vim enable-php.conf
location ~ [^/]\.php(/|$) { # comment try_files $uri =404; to enable pathinfo #try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; include pathinfo.conf;#新增pathinfo模式 }
service nginx restart
OK
标签:
原文地址:http://www.cnblogs.com/fover/p/4986572.html