- 代理服务器A,IP为192。168.31.3,配置nginx。
- 网站1,部署在与A同一局域网的服务器,地址为http://192.168.31.4:8180
- 网站2,部署在其他服务器,与服务器A不是同一局域网,网站地址:http://139.139.8.34:8182(公网)
nginx配置
server {
listen 443 http2 ssl;
server_name test1.xxx.com;
location / {
proxy_pass http://192.168.31.4:8180;
}
}
server {
listen 443 http2 ssl;
server_name test2.xxx.com;
location / {
proxy_pass http://139.139.8.34:8182;
}
}
网站1通过https://test1.xxx.com可以访问,但网站2通过https://test2.xxx.com无法访问(通过http://139.139.8.34:8182可以访问)
请问需要如何配置才能使得网站2可以通过https://test2.xxx.com访问?
我先弱弱的问一句
你的https://test2.xxx.com
也指向了192.168.31.3么