一、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