2대의 서버를 로드 밸런싱하고 있습니다. 둘 다 다른 도메인 이름에 있습니다. 이에 대한 로드 밸런싱을 구성했습니다. 현재 연결을 설정할 수 없습니다. 내가 뭘 잘못했나요? 또한 이 작업을 수행하려면 server2에서 어떤 구성을 수행해야 합니까?
오류 기록:
Connection refused: AH00957: HTTP: attempt to connect to IP:8090 (IP) failed
아파치 000-default.conf:
<VirtualHost *:443>
ServerName domain.de
ServerAlias www.domain.de
SSLEngine on
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile /etc/letsencrypt/live/domain.de/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.de/private.key
SSLCertificateChainFile /etc/letsencrypt/live/domain.de/chain.pem
<Proxy balancer://mycluster>
BalancerMember http://IP:8090 route=server1
BalancerMember http://IP:8009 route=server2
</Proxy>
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
ProxyPassReverse / balancer://cluster/
ProxyPreserveHost On
</VirtualHost>
수코양이:
<Connector port="8443" enableLookups="true" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"
maxThreads="200" disableUploadTimeout="true" connectionTimeout="36000"
compression="off" sslProtocols="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1" ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_
ECDHE_RSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256,
TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA"
compressionMinSize="1024" scheme="https" secure="true" clientAuth="false"
keystoreFile="/etc/letsencrypt/live/domain.de/KEYSTORE.jks" keyPass="PASS" keyAlias="tomcat" keystorePass="PASS" URIEncoding="utf-8"/>
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="server1">
답변1
HTTPS 커넥터는 포트 8443에서 실행되고 AJP는 8090이 아닌 8009에서 실행됩니다.
편집하다:
<Proxy balancer://mycluster>
BalancerMember ajp://SERVER1_IP:8009 route=server1
BalancerMember ajp://SERVER2_IP:8009 route=server2
</Proxy>
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
# I think you can remove these lines
#ProxyPassReverse / balancer://mycluster/
#ProxyPreserveHost On