我已经创建了一个AWS API网关,我将它指向一个VPS。我希望能够为我的VPS启用客户端SSL身份验证。我遵循了AWS演练here。我在API网关控制台中生成了PEM编码的证书,并将其复制到我的Apache Web服务器。看来证书和/或vhost配置在Apache SSL模块中导致致命错误。
错误日志:
[Tue Nov 10 10:53:57.140815 2015] [ssl:info] [pid 7283] AH01914: Configuring server example.com:443 for SSL protocol
[Tue Nov 10 10:53:57.140998 2015] [ssl:trace1] [pid 7283] ssl_engine_init.c(724): Configuring permitted SSL ciphers [!aNULL:!eNULL:!EXP:HIGH:!aNULL]
[Tue Nov 10 10:53:57.141165 2015] [ssl:debug] [pid 7283] ssl_engine_init.c(843): AH01904: Configuring server certificate chain (1 CA certificate)
[Tue Nov 10 10:53:57.141175 2015] [ssl:debug] [pid 7283] ssl_engine_init.c(390): AH01893: Configuring TLS extension handling
[Tue Nov 10 10:53:57.141204 2015] [ssl:emerg] [pid 7283] AH02572: Failed to configure at least one certificate and key for example.com:443
[Tue Nov 10 10:53:57.141226 2015] [ssl:emerg] [pid 7283] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
[Tue Nov 10 10:53:57.141251 2015] [ssl:emerg] [pid 7283] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
AH00016: Configuration Failed
Apache vhost配置:
<VirtualHost *:443>
ServerName example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/example
DirectoryIndex index.html
SSLEngine on
SSLCertificateChainFile ssl/ca.crt
SSLVerifyDepth 1
LogLevel info ssl:warn debug trace1
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
答案 0 :(得分:1)
进一步的研究证明@Michael - sqlbot在这两方面都是正确的。在AWS API Gateway与第三方服务器端点通信之前,需要来自证书颁发机构的证书。