nginx 必须启用 启用 --with-stream 模块。
./configure --with-stream --with-http_ssl_module --with-http_stub_status_module
可下载源码编译。
nginx.conf的配置:
worker_processes 1; events { worker_connections 1024; } stream { server{ listen 1521 so_keepalive=on; proxy_pass 10.1.101.3:1521; proxy_timeout 72h; } } ~
更一般的写法:
worker_processes 1; events { worker_connections 1024; } stream {
upstream oracle{ server 10.1.101.3:1521; }
server { listen 1521; proxy_pass oracle; } }