首页 > Web开发 > 详细

nginx 安装 nginx_http_push_module

时间:2014-12-29 16:54:51      阅读:426      评论:0      收藏:0      [点我收藏+]

一键安装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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!