上配置 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 server { listen 80; server_name g.pengxiaochao.me; location / { proxy_pass https://www.google.com; proxy_redirect off; proxy_set_header Host www.google.com; proxy_set_header Accept-Encoding ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; sub_filter https://www.google.com http://g.pengxiaochao.me; sub_filter_once off; sub_filter_types *; } } 过程 起因是在 Telegram 里抽奖,抽到了一个 github 学