Phoenix:python phoenixDB 调整支持https,以及load balance配置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012551524/article/details/89644451

本机内网IP:10.2.10.10

本机8764,转跳另外两台queryServer的8765

1、nginx配置:

upstream phoenixServer {

server 10.2.10.14:8765 backup;

server 10.2.10.13:8765;

}

server{ 

listen 8764;

ssl on; 

ssl_certificate /var/lib/waagent/175EDF84E60542764010B6CD37A9C08318F854E7.crt;

ssl_certificate_key /var/lib/waagent/175EDF84E60542764010B6CD37A9C08318F854E7.prv;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

ssl_ciphers HIGH:!aNULL:!MD5;

location / {

proxy_pass http://phoenixServer;

access_log /var/log/nginx/phoenixServer.log;

error_log /var/log/nginx/phoenixServer_error.log;

}

2、phoenixDB 源码:client.py 修改链接方式从httplib.HTTPConnection(self.url.hostname, self.url.port)到httplib.HTTPSConnection(self.url.hostname, self.url.port, context=ssl._create_unverified_context())

3、测试

猜你喜欢

转载自blog.csdn.net/u012551524/article/details/89644451