502 Bad Gateway nginx 报错(Ubuntu)

502 Bad Gateway nginx 报错(Ubuntu)

502 Bad Gateway

/var/log/nginx/error.log

ps -ef grep nginx

1
2
3
4
5
6
7
csjtl@ubuntu:/etc/nginx/sites-available$ ps -ef grep nginx
root 56043 1 0 10:59 ? 00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
csjtl 56044 56043 0 10:59 ? 00:00:00 nginx: worker process
csjtl 56045 56043 0 10:59 ? 00:00:00 nginx: worker process
csjtl 56046 56043 0 10:59 ? 00:00:00 nginx: worker process
csjtl 56047 56043 0 10:59 ? 00:00:00 nginx: worker process
csjtl 56550 55840 0 11:17 pts/0 00:00:00 grep --color=auto nginx
1
csjtl@ubuntu:/etc/nginx$ sudo vi nginx.conf 

502 Bad Gateway

1
csjtl@ubuntu:/etc/nginx$ sudo service nginx restart

403 Forbidden nginx/1.17.9 (Ubuntu)

网站服务器汇总:

https://tl8517.com/categories/Build-Personal-Website/UbuntuServer/

参考文档:

https://blog.csdn.net/yishuifengxiao/article/details/80574769