一、Nginx 404 的问题
找到 nginx 的配置文件 nginx.conf,在 server 内加入以下代码:
location / {
try_files $uri $uri/ /index.php?$args;
}
然后重启 nginx
二、提示网站无法访问(500),或者接口链接无法访问
找到 nginx.conf 同一目录下的 fastcgi.conf,搜索如下代码:
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
根据自己的项目路径进行修改,如下:
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/wwwroot/xxxx/:/tmp/:/proc/";
然后重启 nginx