nginx做正向代理

 #代理服务器设置
   server {
       resolver 8.8.8.8;
       resolver 114.114.114.114;
       listen 8080;
       access_log /home/lin/proxy.access.log;
       error_log /home/lin/proxy.error.log;
       location / {
           proxy_pass https://$host$request_uri;
           proxy_set_header Host $http_host;
           proxy_ssl_session_reuse off;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;#记录客户端地址,多级代理服务期地址
           proxy_hide_header X-Forwarded-For;#不记录客户端地址
       }
   }

猜你喜欢

转载自www.cnblogs.com/linyouyi/p/10409235.html

相关文章