Skip to content
Advertisement

Laravel routes causing 404 Error on live server

I have a laravel app developed on my localhost and working perfectly. I am trying to deploy it onto an AWS Lightsail instance using nginx on Ubuntu 20.04. I have uploaded my laravel app and changed the nginx root directory to laravelapp/public.

The main index page (landing page) is working fine but none of my routes are working (i.e. /login, /about etc). When I try to visit any of the routes I get a 404 not found error.

Here is my nginx/sites_available/default file:

JavaScript

and this is the view of my route list:

Laravel App Routes

Advertisement

Answer

JavaScript

compare here: https://laravel.com/docs/7.x/deployment#nginx

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement