|
|
SELinux が HAProxy をブロックする場合、それに応じて SELinux コンフィギュレーションを調整します。
|
global
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
[root@hasrv]# haproxy -vv
Omitted output.
…
Built with OpenSSL version : OpenSSL 1.1.1k FIPS 25 Mar 2021
Running on OpenSSL version : OpenSSL 1.1.1k FIPS 25 Mar 2021
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports : TLSv1.0 TLSv1.1 TLSv1.2 TLSv1.3
…
Omitted output.
|
|
OpenSSL 1.1.1 以降を使用して構築されている HAProxy バージョンを使用することを強くお勧めします。以前のバージョンの OpenSSL ライブラリは TLSv1.3 をサポートしていません。
|
frontend ft_web
bind *:8443 ssl crt /certs/haproxy.pem name sslweb
backend platform
server platform1 platform1:8443 ssl verify none
server platform2 platform2:8443 ssl verify none
frontend ft_web
bind *:<HAProxy listening port> ssl crt /certs/haproxy.pem name sslweb
#path based routing to eMessage connector
acl emsg path_beg /eMessgae /lwPing /upload /download
use_backend emessage if emsg #conditional forwarding to the emessage backend
default_backend platform
backend emessage
balance roundrobin
server emessage <eMessage port> check port 9009 check ssl
verify none
openssl req -newkey rsa:2048 -nodes -x509 -days 365 -keyout haproxy.key -out haproxy.crt -subj "/CN=$HAPROXY_SSL_SERVER_CERT_CN" && \
cat haproxy.crt haproxy.key >> /certs/haproxy.pem
chmod 755 /certs/haproxy.pem && \
PLATFORM_ADDRESSES: platform1,platform2,platform3
CXSERVER_ADDRESSES: cxserver1,cxserver2
HAPROXY_STAT_USER: admin
HAPROXY_STAT_PASSWORD: thingworx
SSL_ENABLED: true
SSL_CERT_PATH: /certs/haproxy.pem
LOG_LEVEL: debug
PLATFORM_SECURE: true
PLATFORM_SECURE_PORT: 8443
PLATFORM_PORT: 8080
CXSERVER_SECURE: true
CXSERVER_SECURE_PORT: 8443
CXSERVER_PORT: 8080
haproxy:
image: artifactory.rd2.thingworx.io/twxdevops/tw-lb-haproxy:latest
container_name: haproxy
ports:
- 9100:8080
- 9143:8443
- 1936:1936
environment: *haproxy-env
volumes:
- certs:/certs