Home > Backend Development > PHP Tutorial > nginx 安装 nginx_http_push_module

nginx 安装 nginx_http_push_module

WBOY
Release: 2016-08-08 09:32:02
Original
1080 people have browsed it

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;
}
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template