I am also having this problem on my Linux box I run at home. I had the webserver running perfectly then followed directions to activate virtual hosting. That also started out working perfectly for a while then suddenly I was getting the 502 error when launching anything from the static site. I run Wordpress and Piwigo in frames within my static site. I have tried the sock to :9000 listen option with no change.
nginx version: nginx/1.14.2
PHP 7.3.4-2 (cli) (built: Apr 13 2019 19:05:48) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.4-2, Copyright (c) 1999-2018, by Zend Technologies
Linux webserver 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64
Any help would be much appreciated. I am quite the noob when it comes to setting up a raw Linux webserver so am learning as I go.
Radjin~