I used this guide to setup my local development environment using NginX / PHP-FPM in docker containers: https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose
The app runs perfectly fine and this setup actually helped me solved permission issue that comes from running Laravel app in Docker on Linux OS. My headache at the moment is; when ever there is a laravel error (e.g. route not defined, or some exception occurs), I see this error message:
502 Bad Gateway
However, if I tail my container logs (with the command: docker-compose logs -f --tail=100) I can see the real error that is normally displayed in browser:
my-app | NOTICE: PHP message: [2020-04-21 23:43:16] local.ERROR: Route [vendor.dashboard] not defined. {"userId":6,"exception":"[object] (Symfony\\Component\\Routing\\Exception\\RouteNotFoundException(code: 0): Route [vendor.dashboard] not defined. at /var/www/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:420)
my-app | [stacktrace]
my-app | #0 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Redirector.php(176): Illuminate\\Routing\\UrlGenerator->route('vendor.dashboar...', Array)
etc...
Any idea why this might be? How do I get the errors from my laravel app to show up normally in local dev? (P.S. debug is enabled in laravel via env)
OS: Kubuntu 20.x / Laravel 7.x / PHP 7.x / Nginx 1.x
Here are some files from my setup that might be of interest:
phpinfo() call)