上一篇文章中提到让nginx支持thinkphp重写的方法,如果你用lnmp一键安装包,这一操作会影响所有站点,因为在每个站点配置中都引入了这一配置文件。
server
{
listen 8089;
#listen [::]:80;
server_name wxoa.dledc.com localhost;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/default/weiqi;
include n.conf;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log off;
}
只需要将include enable-php.conf; 这一行前加上#号注释掉即可