Laravel route gives 404 error on nginx
You might get not found error (404) when you access laravel API end points on nginx. To resolve this we need to add below rules in nginx.conf. Post that reload nginx conf.
location @rewrite { rewrite ^/(.*)$ /index.php?_url=/$1; } location / { try_files $uri $uri/ @rewrite; }
$ service nginx reload