VMWare VM 에서 실행 되는 CentOS 7 (새로 설치)에서 Apache HTTPd 2.4.6을 사용하여 리버스 프록시 서버를 빌드하고 있습니다.
또한의 recommandations 다음 https://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI (게시물을 통해 발견 https://stackoverflow.com/questions/14830133/apache-httpd-virtual-host-ssl-certificate을 ). https://stackoverflow.com/questions/36050140/centos-httpd-ssl-404-error 게시 하십시오 .
Apache HTTPd 실제 구성 (/etc/httpd/conf.d/my.domain.com.conf) :
LoadModule ssl_module modules/mod_ssl.so Listen 443 NameVirtualHost *:443 SSLStrictSNIVHostCheck off <VirtualHost *:443> ServerName my.domain.com SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RCA+RSA:+HIGH:+MEDIUM:+LOW SSLCertificateFile /etc/pki/tls/certs/my.domain.com.cer SSLCertificateKeyFile /etc/pki/tls/private/my.domain.com.key SSLCertificateChainFile /etc/pki/ca-trust/source/anchors/chained.pem ProxyPreserveHost On <LocationMatch "/myapp"> ProxyPass http://X.X.X.X:8080/app ProxyPassReverse http://X.X.X.X:8080/app </LocationMatch> </VirtualHost>
인증서 체인 파일 chained.pem
에 내 CA가 포함되어 있습니다.
이 CA는 인증서 발급자이며 my.domain.com.cer
저장된 개인 키 my.domain.com.key
가 정확합니다.
이 CA가 추가되었습니다 /etc/pki/tls/certs/ca-bundle.crt
구문이 맞습니다 ( httpd -t
).
> 문제 : my.domain.com에 접속하면 VMWare 인증서가 대신 보내집니다.
curl을 사용하여 도메인에 요청하면 클라이언트에서 :
curl -v https://my.domain.com -k (...) * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none * TLSv1.2 (OUT), TLS header, Certificate Status (22): (...) * Server certificate: * subject: C=US; L=Palo Alto; OU=VMware; CN=VMware; emailAddress=none@vmware.com * start date: May 24 09:24:16 2017 GMT * expire date: May 24 09:24:16 2018 GMT * issuer: C=US; L=Palo Alto; OU=VMware; CN=VMware; emailAddress=none@vmware.com * SSL certificate verify result: self signed certificate (18), continuing anyway.
클라이언트에서 Chrome을 사용하여 도메인에 요청하면 :
HTTPd 서버에서 httpd 디버그 로그의 SSL 오류에 대한 것은 없습니다.
[Wed Mar 14 05:31:00.572506 2018] [ssl:info] [pid 2715] AH02200: Loading certificate & private key of SSL-aware server 'my.domain.com:443'
[Wed Mar 14 05:31:00.573282 2018] [ssl:debug] [pid 2715] ssl_engine_pphrase.c(506): AH02249: unencrypted RSA private key - pass phrase not required
[Wed Mar 14 05:31:00.573333 2018] [ssl:info] [pid 2715] AH01914: Configuring server my.domain.com:443 for SSL protocol
[Wed Mar 14 05:31:00.574085 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(872): AH01904: Configuring server certificate chain (2 CA certificates)
[Wed Mar 14 05:31:00.574105 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(406): AH01893: Configuring TLS extension handling
[Wed Mar 14 05:31:00.574116 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(919): AH02232: Configuring RSA server certificate
[Wed Mar 14 05:31:00.574356 2018] [ssl:debug] [pid 2715] ssl_util_ssl.c(489): AH02412: [my.domain.com:443] Cert matches for name 'my.domain.com' [subject: emailAddress=xxxx@yyy.fr,CN=my.domain.com ....... / notbefore: Mar 12 14:58:57 2018 GMT / notafter: Mar 9 14:58:57 2028 GMT]
[Wed Mar 14 05:31:00.574369 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(974): AH02236: Configuring RSA server private key
[Wed Mar 14 05:31:00.640615 2018] [ssl:info] [pid 2715] AH02200: Loading certificate & private key of SSL-aware server 'my.domain.com:443'
[Wed Mar 14 05:31:00.641115 2018] [ssl:debug] [pid 2715] ssl_engine_pphrase.c(506): AH02249: unencrypted RSA private key - pass phrase not required
[Wed Mar 14 05:31:00.641180 2018] [ssl:info] [pid 2715] AH01914: Configuring server my.domain.com:443 for SSL protocol
[Wed Mar 14 05:31:00.641646 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(872): AH01904: Configuring server certificate chain (2 CA certificates)
[Wed Mar 14 05:31:00.641656 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(406): AH01893: Configuring TLS extension handling
[Wed Mar 14 05:31:00.641666 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(919): AH02232: Configuring RSA server certificate
[Wed Mar 14 05:31:00.642392 2018] [ssl:debug] [pid 2715] ssl_util_ssl.c(489): AH02412: [my.domain.com:443] Cert matches for name 'my.domain.com' [[subject: emailAddress=xxxx@yyy.fr,CN=my.domain.com ....... / notbefore: Mar 12 14:58:57 2018 GMT / notafter: Mar 9 14:58:57 2028 GMT]
[Wed Mar 14 05:31:00.642492 2018] [ssl:debug] [pid 2715] ssl_engine_init.c(974): AH02236: Configuring RSA server private key
[Wed Mar 14 05:31:00.656912 2018] [proxy:debug] [pid 2717] proxy_util.c(1843): AH00925: initializing worker http://X.X.X.X:8080/app shared
[Wed Mar 14 05:31:00.656964 2018] [proxy:debug] [pid 2717] proxy_util.c(1885): AH00927: initializing worker http://X.X.X.X:8080/app local
[Wed Mar 14 05:31:00.656984 2018] [proxy:debug] [pid 2717] proxy_util.c(1936): AH00931: initialized single connection worker in child 2717 for (X.X.X.X)
/ etc / httpd / logs / ssl_error 로그가 없습니다.
고객이 왜 내 대신 WMWare 인증서를 받는지 이해가되지 않습니다. :(
참고 : iptables 서비스가 설치되어 있지 않으며 기본 파일 /etc/httpd/conf.d/ssl.conf가로드되지 않았습니다 (ssl.conf.bak로 변경됨)