1.更新nginx源
#centos6的nginx源 #centos7的话吧url 的6改为7就行了 vim /etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/6/$basearch/ gpgcheck=0 enabled=1
2.卸载老的nginx的模块
yum remove nginx-mod*
yum install nginx-module-*
3.更新nginx
yum update nginx
4.重启nginx
nginx -t
nginx -s reload