
nginx 反向代理 502 Bad Gateway
查看nginx的error.log日志文件发现如下信息: upstream sent too big header while reading response header from upstrea

nginx 504 gateway time out
出现这个问题原因是我用nginx作代理服务器,IIS作后台服务器。当IIS处理的时间稍长,或没有响应时。 nginx会出现504 gateway time out,解决的方法是在nginx.conf修

502 Bad Gateway 自动重启脚本
一个简单的脚本,用来监控502的,如果遇到502,自动重启PHP进程。适用于LNMP环境。以下文件,存放于 /root 或其它目录:#!/bin/bashMY_URL=http://www.vpsmm.com/RESULT=`curl -I $MY_URL|grep HTTP/1.1 502`if [ -n $RESULT ]; then/etc/init.d/php-fpm rest