Hi I'm trying to build a laravel project on my VPS using CentOS 7 and NGINX but I'm getting a blank screen for IP_ADDRESS and also IP_ADDRESS/index.php. This is my project structure
PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/usr/share/nginx/html/laravel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /usr/share/nginx/html/laravel/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
if you have time I can give you ssh access. I'm working on it for about 1 week and couldn't fix it on apache and IIS finally I switched to NGINX @Snapey
Are you able to run php artisan route:cache , php artisan config:cache , php artisan view:clear and php artisan cache:clear? Or do you receive an error as well? Please try them all
After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.
If changing permission for Storage and Bootstrap/Cache does not work for you then, it might be worth checking your SELINUX (Security Enhanced Linux) config
When I changed SELINUX mode to 'Permissive' then it worked fine.
Run command
setenforce 0
It should set the SELINUX mode to 'Permissive'.
Now try your site - hopefully it works for you too.
If you want to change SELINUX back to enforcing:
Run this command:
setenforce 1
Note: As far as I understand setting mode to permissive is not recommended - there are ways to set the SELINUX to 'enforcing' and make the Laravel Site work - which makes the site and system more secure.