如何讓 Laravel 在 Centos 7 上正常執行,您可以執行下面指令就可以使用 Laravel:
# might not be necessary, try the below first
yum install policycoreutils-python -y
# add a new httpd read write content to sellinux for the specific folder, -m for modify
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/laravel/storage(/.*)?"
# same as the above for b/cache
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/laravel/bootstrap/cache(/.*)?"
# this command is very important to, it's like a restart to apply the new rules
restorecon -Rv /var/www/html/laravel/
資料來源:https://stackoverflow.com/questions/23411520/how-to-fix-error-laravel-log-could-not-be-opened
沒有留言:
張貼留言