nginx http 正向代理

打开 ginx-1.12.2conf ginx.conf,

在http{      } ,大括号内加入

  

http
{

         #............................. 
         #.............................
         #.....................以上为默认配置

       resolver 223.5.5.5;
    server {
        listen 8188;
        location / {
            proxy_pass http://$http_host$request_uri;
        }
    }

}
resolver为DNS,
listen 8188; 要监听端口

nginx -s reload 即可。



原文地址:https://www.cnblogs.com/runliuv/p/8064573.html