forwarding the request centos nginx tcp

Download the latest version of nginx

> wget http://nginx.org/download/nginx-1.17.1.tar.gz

 

unzip

> tar zxvf nginx-1.17.1.tar.gz

> cd nginx-1.17.1

 

Configuration

> ./configure --with-stream --with-stream_ssl_module

Construct

> make

> make install

 

Modify the configuration file

> We /usr/local/nginx/conf/nginx.conf

stream {
  server {
    listen 5433;
    proxy_pass 172.16.105.41:5433;
  }
}

 

 

Start nginx

nohup /usr/local/nginx/sbin/nginx &

 

Guess you like

Origin www.cnblogs.com/lavezhang/p/11096813.html