nginx配置之代理功能

nginx代理功能

    至少需要两台主机:

      代理机配置----如下:

          yum安装的/etc/nginx/nginx.conf          

            location / { 

              #服务机的ip端口 

              proxy_pass http://192.168.160.132:80; 

            }

          注意停用防火墙:

            -----systemctl stop firewalld    关闭防火墙

            -----systemctl disable firewalld  禁止开机自启

       服务机-------正常配置

    访问代理机的ip,自动转发到服务器

原文地址:https://www.cnblogs.com/open-yang/p/11255885.html