2016年2月26日 星期五

nginx 跑CI 產生500錯誤空白頁

環境:Linode
系統:CentOS 7

把在VM上用Apache跑的CI 2.2.1專案搬到新的Linode上,打開後跑500錯誤空白頁,而且nginx error log 沒有報錯

原因:php-mysql沒有安裝
# php -i | grep mysql
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
安裝 php-mysql
# yum install php-mysql
重啟php-fpm(只重啟nginx無效)
# service php-fpm restart

參考資料:
http://serverfault.com/questions/412683/configuring-nginx-php5-fpm-to-work-with-codeigniter  Configuring Nginx & php5-fpm to work with Codeigniter


沒有留言:

張貼留言