A 502 Bad Gateway means that the reverse proxy is receiving an error from the source nginx server. So one initial test would be to temporarily point your site at a folder containing only a really simple
hello-world.html or such and see if that works.
The next thing to check would be to look at the nginx reverse proxy error logs (if any):
- go to the System Stack, right-click on the Nginx Reverse Proxy service and select "Show compiled in Finder..."
- Find the
nginx_reverse_proxy/logs folder. I would suggest deleting everything from that first.
- Then, recreate the 502 error scenario and see if a log entry is created as a result.
If you do get a logged error, can you copy it in here?
Finally, it would be interesting to see the contents of your site's reverse proxy config file. That's at a path something like
system-stack/nginx_reverse_proxy/conf/sites-enabled/rp.yoursite.dev.conf. Feel free to sanitise it if there's anything you don't want public.