After installing Laravel, you may need to configure some permissions. Directories in the repository and boot / cache directories should be writable by your web server. - http://laravel.com/docs/master#configuration
The Laravel Storage folder and the bootstrap / cache folder need access from the command line user (the one that starts the linker update, etc.) and the default web server user (www-data) if you use ubuntu on your EC2 instance.
The following three teams ensure that both are entitled to it. Run them at the root of your project
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1` sudo setfacl -R -mu:"$HTTPDUSER":rwX -mu:`whoami`:rwX storage bootstrap/cache sudo setfacl -dR -mu:"$HTTPDUSER":rwX -mu:`whoami`:rwX storage bootstrap/cache
This should start displaying specific errors that can be debugged. Also make sure the debug option is set to true in app.php
yourproject/config/app.php 'debug' => true,
Also make sure you have a default .env file that indicates the environment at the root of the project.
yourproject/.env //should have this APP_ENV = dev
Also, if you use sessions, etc., make sure that you have the generated key using this command and that it does not have config / app.php set as
'key' => env ('APP_KEY', 'SomeRandomString'),
yourproject/config/app.php php artisan key:generate
One common mistake for new instances of Amazon EC2 is to assign a security group to your instance that does not have ports 80 and 443 allowed as incoming. Check your EC2 instance security group and enable these ports in the group if they were not already.
source share