According to the Laravel docs, “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”.
After running this command to install Laravel via Composer:
1 |
composer create-project --prefer-dist laravel/laravel blog |
Change directory ownership by running these commands:
1 2 |
sudo chown -R www-data:www-data /path/to/your/project/storage sudo chown -R www-data:www-data /path/to/your/project/bootstrap/cache |
Then you should see “Laravel 5” on your public folder when you visit it on a web browser.
Make sure you setup your app key by running php artisan key:generate
, or else your Laravel still won’t run!