浏览 1.2k
需求:客户端通过nginx stream代理调用服务端https接口请求
问题:1)nginx需要配置证书么?
2)编译时除了--with-stream模块,还需要什么模块?
3)curl测试stream反向代理地址端口时是使用http还是https?
按点赞数排序
按时间排序
如果不做TLS卸载,就不需要配置证书
0
回答于2021-05-06 10:14
收到,多谢陶辉老师。目前碰到一个问题,使用stream做反向代理测试curl测试提示如下信息:
curl https://www.baidu.com:9993
curl: (35) Encountered end of file
配置信息如下:
stream {
map $ssl_preread_server_name $backend_pool {
www.so.com server_ng;
www.baidu.com server_estpay;
}
upstream server_ng{
server www.so.com:443;
}
upstream server_estpay{
server www.baidu.com:443;
}
server{
listen 9993;
ssl_preread on;
proxy_pass $backend_pool;
proxy_connect_timeout 15s;
proxy_timeout 15s;
proxy_next_upstream_timeout 15s;
}
}
ng本机hosts配置:
133.0.183.163 www.baidu.com
--麻烦问下这种是什么问题,谢谢!
0
回答于2021-05-08 04:37