作者LaughPoint (脚步)
看板Linux
标题[问题] nginx 一个port 两个server
时间Mon Feb 17 11:46:59 2020
有两台server 都需要用到 https
nginx 分别 listen 443 然後各自反向代理到 A B两台 server
一台成功了,另外一台却出现502
请问nginx可以同一个ip同一个port,去对应到不同的server的https service吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 210.63.214.193 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Linux/M.1581911222.A.C9B.html
1F:→ justoncetime: virtual host? 02/17 12:15
2F:推 chang0206: name based virtual hosting 02/17 12:21
3F:推 a07051226: server { } 02/17 15:46
4F:推 froce: 可以啊,用location分开就行 02/17 17:17
5F:→ kenduest: 502 是 bad gateway, 检查是否目的位置是否写错 02/17 18:21
6F:推 PiggyWiggy: 除了location以外还可以用server_name 域名。 08/09 03:06