Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

alex29's avatar

Where can I find the logs for 404 redirects?

I uploaded my website to Digital Ocean and it's working fine except for some routes. For example, when I navigate to /admin/users I get the view, but when I navigate to /admin/jobs I get the default 404 page. I am trying to debug this but I can't seem to figure out where the log files are for 404 redirects. I checked /storage/logs but it's empty.

0 likes
5 replies
Snapey's avatar

what are you expecting to see there? You performed a request, the router said dont know what you mean. There's not a lot more to it.

You know the route being used, Is it valid according to php artisan route:list?

There are three common causes for this issue when moving to production

  1. not taking into account that most production servers are case sensitive

  2. having the wrong document root set for your webserver

  3. Missing or invalid .htaccess file

1 like
alex29's avatar

@SNAPEY - I fixed the problem. It was because of a Model::firstOrFail() query in my controller when it had no data to work with. I was hoping for a more detailed error message than just the 404 page.

Snapey's avatar

Interesting point. I think its because its a quite common use case and failing in this way is not considered an uncaught error worthy of logging. There is so much crap traffic on the internet, you woukd soon be complaining about your logs being full of random stuff.

Its actually down to your design how it should handle missing resources.

Glad you got it sorted.

Please or to participate in this conversation.