唯's Blog

笔者是一个热爱编程的 Java 程序员。

0%

Nginx反向代理谷歌

nginx配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

server {

listen 80;

server_name igoogle.com;

resolver 8.8.8.8;

location / {

root html;

index index.html index.htm;

proxy_pass https://www.google.com;

proxy_connect_timeout 120;

proxy_read_timeout 600;

proxy_send_timeout 600;

send_timeout 600;

proxy_redirect off;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}



}