0

I got this error when I deploy the Laravel project to AWS

404 Not Found nginx/1.18.0

I follow this question and create this path in main dir of the project but still the error there!

.platform/nginx/conf.d/elasticbeanstalk/laravel.conf

inside laravel.conf:

location / {
  try_files $uri $uri/ /index.php?$query_string;
  gzip_static on;
}

2 Answers2

2
  1. Goto Configurations on the left pane
  2. Select software edit
  3. under root document write /public
  4. if you got 404 again change Nginx to apache
MShokry
  • 81
  • 8
  • 1
    Thank you so much! Changing from Nginx to Apache did it for me, after setting the document root to /public. – jamawe Dec 23 '20 at 12:17
0

make sure the document root folder is pointed to the public folder, not the installation root folder

AWS PS
  • 4,420
  • 1
  • 9
  • 22
  • Can you please explain more I didn't get you! ( you mean move the path that I create to public folder ?) –  Aug 23 '20 at 17:55
  • in nginx you specify the root folder, make sure it's pointing to the public folder inside laravel installation – AWS PS Aug 24 '20 at 09:13
  • that's mean move laravel.conf to public folder ? –  Aug 28 '20 at 00:12