Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

573
Vistas
Laravel 5XX errors are intercepted as 502 Bad Gateway in NginX with PHP-FPM running in Docker

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:

  • docker-compose.yml
  • Dockerfile
  • nginx/conf.d/app.conf
  • php/local.ini (verified this is loaded by checking phpinfo() call)
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda