一、http反代 用1.com反代2.com server { listen 80; server_name 1.com www.1.com; location / { proxy_pass http://2.com; proxy_set_header Host 2.com; proxy_set_header X-Forwarded-For $remote_addr; proxy_cache_key 2.com$request_uri$is_args$args; proxy_cache_valid 200 304 …