Nginx Configuration for windows
Configuration for windows
nginx.conf
在文件尾部添加以下配置
stream { include streams/*.conf; }
*.conf
在Nginx安装目录下,创建streams目录,然后在streams中添加需要的conf配置
\conf\streams\mssql.conf
upstream mssql { # hash $remote_addr consistent; # server 127.0.0.1:49905 max_fails=3 fail_timeout=30s; server 192.168.10.107:1433 max_fails=3 fail_timeout=30s; } server { listen 1433; proxy_connect_timeout 1s; proxy_timeout 3s; proxy_pass mssql; }