-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于负载均衡(upstream)的 Host 设置问题 #83
Comments
proxy_set_header Host 这一项需要配置为$backend_host吗?
…---原始邮件---
发件人: ***@***.***>
发送时间: 2023年6月19日(周一) 下午5:25
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: [cym1102/nginxWebUI] 关于负载均衡(upstream)的 Host 设置问题 (Issue #83)
map_hash_bucket_size 128; map $http_host $backend_host { default a.**.com; a.**.com a.**.com; b.**.com b.**.com; } upstream test { server a.**.com:80; server b.**.com:80; } server { listen 8082; location / { proxy_pass http://test; proxy_set_header Host $backend_host; } }
如上我们有一组相同功能的后端服务( http header 必须携带对应 host 才能访问),期望请求转发到后端服务器时,服务器收到 host 仍然是 a..com 或者 b..com,应该如何配置?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
是的 |
暂时只能使用额外参数,我的host选项没有那么多
…---原始邮件---
发件人: ***@***.***>
发送时间: 2023年6月19日(周一) 下午5:44
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [cym1102/nginxWebUI] 关于负载均衡(upstream)的 Host 设置问题 (Issue #83)
是的
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如上我们有一组相同功能的后端服务( http header 必须携带对应 host 才能访问),期望请求转发到后端服务器时,服务器收到 host 仍然是 a..com 或者 b..com,应该如何配置?
The text was updated successfully, but these errors were encountered: