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; } }