##Example of HTTP proxy configuration server{ resolver 119.29.29.29; # Configure DNS for domain name resolution resolver_ timeout 5s; # Domain name resolution timeout (5 seconds) listen 8079; # Listening port access_ log /usr/local/nginx/logs/reverse.access.log main; error_ log /usr/local/nginx/logs/reverse.error.log warn; location / { proxy_ pass http://$http_ host$request_ uri; # Configure forward proxy parameters proxy_ set_ header Host $http_ host; # Resolve the Nginx 503 error after the URL contains a "." proxy_ buffers 256 4k; # Configure cache size proxy_ max_ temp_ file_ size 0; # Turn off disk cache read and write to reduce I/O proxy_ connect_ timeout 30; # Proxy connection timeout proxy_ cache_ valid 200 302 0m; proxy_ cache_ valid 301 0h; proxy_ cache_ valid any 0m; # Configure proxy server cache time } }
curl http://ip.vv1234.cn/ -x 172.xx.xx.211:8079