Nginx SNI proxy_ssl_name问题

180 views
Skip to first unread message

xuewen Gong

unread,
Jul 11, 2018, 1:23:16 PM7/11/18
to openresty
Server {
....
server_name www.domain1.com;
....
location /{
    proxy_ssl_server_name on; proxy_ssl_verify off; proxy_ssl_name www.domain1.com;
    proxy_pass https://backend1;
}
}

Server {
....
server_name www.domain2.com;
....
location /{
    proxy_ssl_server_name on; proxy_ssl_verify off; proxy_ssl_name www.domain2.com;
    proxy_pass https://backend1;
}
}

以上两个域名www.domain1.com, www.domain2.com. 如果同时访问www.domain1.com, www.domain2.com,就会源点出现400, invalid hostname。
如果不访问www.domain1.com,单单访问www.domain2.com就没问题。

我的nginx版本时1.13.10。

谢谢

xuewen Gong

unread,
Jul 19, 2018, 4:04:25 AM7/19/18
to openresty
已经解决了,去掉

proxy_set_header Connection '';这个配置就不会出现400问题了,具体为啥不清楚。


在 2018年7月12日星期四 UTC+8上午1:23:16,xuewen Gong写道:
Reply all
Reply to author
Forward
0 new messages