赞
踩
yum install gcc gcc-c++ pcre-devel zlib-devel openssl-devel -y
tar zxvf nginx-1.14.0.tar.gz
cd nginx-1.14.0
./configure --prefix=/usr/local/nginx --with-stream
make && make install
本文通过nignx 80端口代理kafka9092端口
stream {
server {
listen 80;
proxy_pass kafka;
}
upstream kafka {
server 192.168.2.191:9092 weight=1;
}
}
listeners=PLAINTEXT://media01.dynabook.site:9092
## 这个地方填写的端口,必须和nginx代理的端口一致
advertised.listeners=PLAINTEXT://media01.dynabook.site:80
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。