Using: Apache, CentOS 7, Laravel 6.x (to be updated next)
Problem: After successful installation of laravel (default page showing), I have moved my local development files over. Now before replacing the default routes/web.php
I wanted to check if things were OK. I added one of the routes, using a just uploaded controller and view.
When I try to access this page (..../profile) it shows following error:
include(.../Controller.php): failed to open stream: Permission denied
Whereas the default page (.../) still works as normal.
What I have done to attempt to fix:
sudo chown -R apache.apache /var/www/.../laravel
sudo chmod -R 755 /var/www/.../laravel/storage
sudo chmod -R 755 /var/www/.../laravel/bootstrap/cache
sudo php artisan view:cache
All files (including the default view) are owned by apache.apace, so ownership is the same. As per directory permissions I have set the storage and bootstrap/cache folders (https://laravel.com/docs/6.x). How can this be fixed? I am out of idea to fix this...
I can find loads of examples of people with a similar issue, but they seem in the end to be related to permission on /storage or /bootstrap/cache. This seems not related to those, and as a result all suggestions provided did not solve this.