Home > Article > Backend Development > nginx gets 502 every post request
The environment is lnmp
The problem is that nginx has been reversed and pointed to a nodejs project. Every time I submit a post, the form will get 502, and if I refresh it, it will be normal. What the hell
The environment is lnmp
The problem is that nginx has been reversed and pointed to a nodejs project. Every time I submit a post, the form will get 502, and if I refresh it, it will be normal. What the hell
I found the reason. When pm2 started, it watched the entire directory. As a result, the file was changed and it restarted, and then it got 502. . . It took me a long time to find the nginx configuration