更新时间:2023-09-18 16:13:58
Nginx默认不传递主机头,您必须告诉它:
Nginx doesn't pass the host header by default, you have to tell it to:
location @unicorn {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Client-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://unicorn;
}
否则,请求发送到的主机将丢失.
Otherwise which host the request was sent to gets lost.