{{item}}
{{item.title}}
{{items.productName}}
¥{{items.priceOne.price}}/年
{{item.title}}
使用 ThingWorx HA 群集时,可以为 HAProxy 配置 SSL 或 TLS。
可以将 HAProxy 设置为使用外部 SSL 和内部 SSL。您必须提供证书文件。不能使用 passthrough SSL,因为 ThingWorx 需要请求对象的访问权限来进行基于路径的路由。有多个选项可用于在 HAProxy 中配置 SSL。以下内容仅用于参考;有关详细信息,请参阅 https://cbonte.github.io/haproxy-dconv/2.0/configuration.html。
在 global 配置中,您可以为证书和私钥设置可选的默认位置。在前端配置中,您可以配置密码以及支持的 TLS 级别。例如:
global
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
# https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
# An alternative list with additional directives can be obtained from
# https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
前端部分是传入端点的位置。应该在此配置要使用的绑定端口和证书。有关绑定配置的详细信息,请参阅 https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#5.1。
例如:
frontend ft_web
bind *:8443 ssl crt /certs/haproxy.pem name sslweb
如果已在 ThingWorx HA 环境中安装 ThingWorx Flow,则必须绑定端口和证书。
将针对每个后端服务器配置内部 SSL。每台服务器都可以采用不同的设置。在以下示例中,所有平台服务器均支持 SSL,并在端口 8443 上接收请求。已将服务器端点配置为指向该位置并使用 SSL。此示例使用自签名证书,因此,请验证其是否已设置为 none。有关服务器配置选项的详细信息,请参阅 https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#5.2。
backend platform
server platform1 platform1:8443 ssl verify none
server platform2 platform2:8443 ssl verify none
如果已在 ThingWorx HA 环境中安装 ThingWorx Flow,请添加后端 ThingWorx Flow 配置信息:
server nginx **<NGinx\_IP>**:443 check ssl verify none
例如:
cat haproxy.crt haproxy.key >> /certs/haproxy.pem
chmod 755 /certs/haproxy.pem && \\
hingWorx Flow 的示例
如果已在 ThingWorx HA 环境中安装 ThingWorx Flow,请执行以下操作:
1.创建 / 下包含所有必要权限的 certs 文件夹
2.运行以下命令来创建证书:
**sudo openssl req -newkey rsa:2048 -nodes -x509 -days 365 -keyout haproxy.key -out haproxy.crt -subj “/CN=**<Load\_Balancer\_Host>**” && sudo cat haproxy.crt haproxy.key >> /certs/haproxy.pem
此命令将在 /etc/haproxy 文件夹下创建 haproxy.crt 和 haproxy.cfg,在 /certs 文件夹下创建 haproxy.pem。
您可以使用官方 HAProxy 容器并在 certs 和 haproxy.cfg 文件中安装。内部 HAProxy 容器支持以下配置:
证书应安装到 /certs 文件夹:
haproxy:
image: artifactory.rd2.thingworx.io/twxdevops/tw-lb-haproxy:latest
container_name: haproxy
ports:
原文链接:https://support.ptc.com/help/thingworx/platform/r9/zh_CN/index.html#page/ThingWorx/Help/ThingWorxHighAvailability/configuringssltlsforhaproxy.html
尽快选购申请,价格随时改变!