http { include mime.types; default_type application/octet-stream; resolver 8.8.8.8; ##Nginx0.6.18以后的版本中启用了一个resolver指令,在使用变量来构造某个server地址的时候一定要用resolver指令来制定DNS服务器的地址 sendfile on; keepalive_timeout 65; server { listen 180; server_name my.proxy.com; add_header Access-Control-Allow-Origin *; location / { proxy_http_version 1.1; proxy_set_header Connection ""; set $test $args; proxy_pass $test; #proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For https; } access_log D:/soft/nginx-1.20.2/logs/access_proxy.log; error_log D:/soft/nginx-1.20.2/logs/log_proxy.log; }
标签:set,log,header,代理,站点,nginx,proxy,resolver From: https://www.cnblogs.com/chulx/p/17097843.html