laravel 初期設定404

laravel   404 

public/404.html" failed (13: Permission denied)

sudo chown -R nginx:nginx /home/ec2-user/  これやってEC2に入れなくなる!!

 

public/50x.html" failed (2: No such file or directory)

php artisan key:generate

 

.env): failed to open stream: Permission denied

chmod 777 .env   ->  php artisan key:generate  ->

chmod 644 .env