candir() has been disabled for security reasons
解決辦法:
- 進入到php的配置目錄,
編輯php.ini
cd /usr/local/php/etc
vi php.ini - 搜索scandir (/scandir )后刪掉,保存退出。
- 重啟nginx和php-fpm。再刷新查看,OK啦!
service nginx restart
service php-fpm restart
file_put_contents ......... permission denied
解決方法:
-
chmod 777 runtime -R (-R很重要)
將網站根目錄設置到public目錄下,網站白屏500錯誤
解決方法:
- lnmp1.2以上需要進入以下鏈接
https://lnmp.org/faq/lnmp-vhost-add-howto.html#user.ini
執行:LNMP 1.4上也可以直接使用lnmp1.4/tools/ 目錄下的 ./remove_open_basedir_restriction.sh 進行移除。
打開網址,顯示404
解決方法:
- 在網站.conf文件添加 include wordpress.conf;
- 重啟nginx service nginx restart
參考文檔:https://lnmp.org/faq/lnmp-vhost-add-howto.html (lnmp官網)