需求背景:

前段时间公司因为业务需求需要部署一个正向代理,我已经分享出来了https://www.cnblogs.com/Dfengshuo/p/11911406.html,现有因架构个更改,需要再加个在原先的反向代理下再加一层,ok,其实还是挺鸡肋的,但是没办法,领导安排就要根据安排需求做。其实nginx反向代理分两种,四层网络层代理和七层应用层代理,想要实现这两种模式很简单,只是配置文件略微不同而已。今天分享一下四层协议的代理吧!

首先安装nginx环境:

1 yum -y install pcre-devel zlib-devel gcc gcc+c++ make openssl openssl-devel
2 tar xf nginx-1.11.4.tar.gz
3 cd nginx-1.11.4/
4  ./configure --prefix=/usr/local/nginx  --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module --with-http_stub_status_module --with-pcre --with-stream && make && make install
View Code

相关文章:

  • 2022-12-23
  • 2020-03-16
  • 2021-05-19
  • 2022-12-23
  • 2021-10-23
  • 2021-04-14
  • 2021-06-12
  • 2021-08-29
猜你喜欢
  • 2019-11-22
  • 2022-12-23
  • 2021-08-08
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案