Home  >  Article  >  Backend Development  >  nginx 安装 nginx_http_push_module

nginx 安装 nginx_http_push_module

WBOY
WBOYOriginal
2016-08-08 09:32:021039browse

One-click installation of 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;
}

The test is as follows. The left side becomes a long connection


After clicking the send button


The above introduces nginx installation nginx_http_push_module, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn