0

I need your help. I have created a website on Laravel and its working totally fine on my localhost but when I deploy it on AWS using Elastic Beanstalk it shows "Whoops There was an error" title page only without any error or text on the page except title.

I have tried many options like changing env file name, generating app key, changing root folder from / to /public but it just doesn't work. Below I am sharing you my folder structure that I am uploading to AWS beanstalk after zipping. Here is elastic beanstalk url. http://lessyes.us-east-1.elasticbeanstalk.com/

enter image description here

Faisal Shani
  • 698
  • 1
  • 13
  • 37

2 Answers2

3

This is for future users - if you are not seeing actual errors other than "Whoops There was an error", this probably means your app is not in debug mode. To see errors stack, you may want to enable debug temporarily: Make sure APP_DEBUG is set to TRUE (APP_DEBUG=TRUE) in your app's .env file.

Note: Making the above-mentioned change means anyone with read access to your app can see those errors and perhaps get to know more than he/she should about your business logic/data.

Qumber
  • 13,130
  • 4
  • 18
  • 33
  • Hey @qumber thanks for the reply. But when I zipped and uploaded my folder on AWS APP-DEBUg was set to true but it didnt show the error only showed the page with just title "Whoops There was an error". – Faisal Shani Feb 04 '20 at 04:44
  • @FaisalShani You might also want to check for the same in config/app.php (Not required in and above Laravel 5). Also, check if in your server's php.ini, you have `display_errors=On` (http://php.net/display-errors). And, did you run `composer update/install` on the server? Lastly, here is a gist I made to log exceptions to CloudWatch using Monolog (Ensure that `APP_ENV` is NOT set to `local` for this to work): https://gist.github.com/qumberrizvi/f43933521a3d1aec11d4bf10d49675b2 – Qumber Feb 04 '20 at 06:51
1

Probably because your file/folder permissions

How to set up file permissions for Laravel?

sudo find /path/to/your/laravel/root/directory -type f -exec chmod 664 {} \;
sudo find /path/to/your/laravel/root/directory -type d -exec chmod 775 {} \;

For your cache directory:

sudo chmod -R ug+rwx storage bootstrap/cache

Malkhazi Dartsmelidze
  • 4,783
  • 4
  • 16
  • 40