nginx配置正向代理

2019-01-09

正向代理配置例子

1
2
3
4
5
6
7
8
9
10
11
12
13
14
resolver 114.114.114.114 8.8.8.8;
server {

resolver_timeout 5s;

listen 81;

access_log /var/log/nginx/proxy.access.log;
error_log /var/log/nginx/proxy.error.log;

location / {
proxy_pass http://$host$request_uri;
}
}