安装 tengine 备份 nginx 配置文件:

wget -c http://tengine.taobao.org/download/tengine-2.2.0.tar.gz
tar zxvf tengine-2.2.0.tar.gz
cd tengine-2.2.0
./configure
make
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
cp -r objs/nginx /usr/local/nginx/sbin/nginx
vim /usr/local/nginx/conf/nginx.conf

删除如下代码:

location /status {

stub_status on;

access_log off;

}

检测是否正常:

/usr/local/nginx/sbin/nginx -t

提示“the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok configuration file /usr/local/nginx/conf/nginx.conf test is successful”为正常

重启nginx:

kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
/etc/init.d/nginx stop
/etc/init.d/nginx start

查看nginx版本:

/usr/local/nginx/sbin/nginx -v

相关新闻

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

联系我们

联系我们

151-1101-0018

在线咨询:
邮件:30115776@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
关注微信
分享本页
返回顶部