概要
内网端口转发
技术细节
./configure --prefix=/opt/soft/nginx/ --with-http_stub_status_module --with-http_ssl_module --with-stream --with-stream_ssl_module
make&make install
nginx配置反向代理
stream {
upstream mysql-1 {
hash $remote_addr consistent;
server 10.11.88.27:3306 weight=5 max_fails=3 fail_timeout=30s;
}
server {
listen 3307;
proxy_connect_timeout 10s;
proxy_timeout 200s;
proxy_pass mysql-1;
}
}