指定域名
curl -I http://127.0.0.1 -H "host: example.com"
测试HTTPS
curl -I https://example.com --resolve "example.com:443:127.0.0.1"
链接:https://serverfault.com/a/443972/418915
nginx 中的反向代理设置
location / {
proxy_redirect off;
proxy_set_header Host example.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-VHOST base64;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://127.0.0.1;
}