Background
Migrate a Nginx+uwsgi+django project, after startup, access test error 502, background nginx print errors: Upstream prematurely closed connection while reading response Header from upstream problem analysis solution online A bunch of tutorials, look dizzy, have to debug nginx configuration parameters, have to restart the background, and so on but after trying, all do not work, finally calm down to find documents to see, The root cause of this error is actually the Nginx back-end service problem, specific reference https://wenku.baidu.com/view/4947d8d685254b35eefdc8d376eeaeaad1f31601.html This document is very well written and of great practical value. Finally check the Uwsgi problem, the original is the configuration file is less than a configuration, Plugin=python, plus restart on the normal, online said this configuration if the PIP is installed Uwsgi can be removed, but in this project seemingly not, the specific reasons to be studied.