Nginx端口转发配置

修改 /etc/nginx/nginx.conf :

stream {
    server {
        listen 9000;
        proxy_connect_timeout 5s;
        proxy_timeout 20s;
        proxy_pass 123.123.123.123:9000;
    }
    server {
        listen 9000 udp reuseport;
        proxy_timeout 20s;
        proxy_pass 123.123.123.123:9000;
    }
    server {
        listen 12345;
        proxy_connect_timeout 5s;
        proxy_timeout 20s;
        proxy_pass 123.123.123.123:9100;
    }
}

你可能感兴趣的:(Linux)