Laravel 502 Bad Gateway Error
Change your fastcgi_pass
to 127.0.0.1:9000
in your website's nginx sites_enabled
conf file.
If you recently ran sudo apt-get update and installed a new version of PHP, and use nginx, make sure you've updated your fastcgi_pass setting in /etc/nginx/sites-enabled, e.g.:
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
You should also make sure you install the latest version of the pdo_pgsql extension.