下载最新版nginx

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

 

解压缩

> tar zxvf nginx-1.17.1.tar.gz

> cd nginx-1.17.1

 

配置

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

构建

> make

> make install

 

修改配置文件

> vi /usr/local/nginx/conf/nginx.conf

stream {
  upstream server_vertica {
    server 172.16.1.1:5433;
    server 172.16.1.2:5433;
    server 172.16.1.3:5433;
  }

  server {
    listen 9501;
    proxy_connect_timeout 30s;
    proxy_timeout 3600s;
    proxy_pass server_vertica;
  }

}

 

启动nginx

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

 

相关文章:

  • 2021-11-23
  • 2022-02-17
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-04
  • 2021-09-27
  • 2022-03-06
  • 2021-12-31
  • 2022-02-23
  • 2021-11-19
相关资源
相似解决方案