+
96
-

回答

server
{
listen 80;
server_name ~^(www\.)?(.+)$;
index index.php index.html;
root /data/wwwroot/$2;
}

将nginx.conf中的server配置如上就可以了

网友回复

我知道答案,我要回答