码迷,mamicode.com
首页 > Web开发 > 详细

nginx 安装 nginx_http_push_module

时间:2014-12-29 16:56:46      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:nginx   nginx_http_push_modu   

一键安装nginx_http_push_module


cd /opt/ && wget https://github.com/slact/nginx_http_push_module/archive/master.zip && unzip master.zip && cd (/opt/nginx-master | 替换成你的ngnix源码目录) && ./configure --add-module=/opt/nginx_http_push_module-master


nginx.conf 中添加

location /pub {
	push_publisher;
	set $push_channel_id $arg_id;
	push_store_messages off;
}

location /sub {
	push_subscriber;
	set $push_channel_id $arg_id;
}



测试如下 左侧变成长连接了

技术分享



点击send按钮后

技术分享

nginx 安装 nginx_http_push_module

标签:nginx   nginx_http_push_modu   

原文地址:http://blog.csdn.net/starparker/article/details/42238917

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!