nginx 组件添加

nginx支持tcp协议

添加tcp组件支持模块

# 参考nginx + keepalive中的 ./configure 到 make步骤完成 --with-stream模块的安装
./nginx -V
./configure -V复制的参数+ --with-stream 
make

配置文件添加配置

# 根目录下添加stream 模块
stream {
	upstream xxx {
	  server ip:port max_fails=2 fail_timeout=60s;
	}
}
posted @ 2023-01-11 08:55  scorecrow  阅读(23)  评论(0)    收藏  举报