nginx不但可以作為http代理钦勘,還可以作為tcp反向代理
安裝
openresty/1.9.15.1
config時候增加選項(xiàng) --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>