Laravel在CentOS,無法寫入Log的問題

今天在搬遷環境時,遇到目錄權限全開放也無法寫入Log的問題。

測試過後才發現是SELinux httpd_sys_rw_content_t限制了php-fpm的存取。

開啟內容存取權限

sudo chcon -R -t httpd_sys_rw_content_t storage

無法連接Redis

sudo setsebool httpd_can_network_connect=1