美文网首页
使用nginx实现tcp代理

使用nginx实现tcp代理

作者: randyjia | 来源:发表于2016-10-12 13:56 被阅读186次

nginx不但可以作为http代理,还可以作为tcp反向代理
安装
openresty/1.9.15.1
config时候增加选项 --with-stream --with-stream_ssl_module

<pre>

events {
worker_connections 1024;
}
stream {
upstream backend {
server 127.0.0.1:7773;
}
server {
listen 30000;
proxy_timeout 20s;
proxy_pass backend;
}
}
</pre>

来自:
https://www.zybuluo.com/orangleliu/note/478334

相关文章

网友评论

      本文标题:使用nginx实现tcp代理

      本文链接:https://www.haomeiwen.com/subject/vpjiyttx.html