Apache配置AWS API网关证书



我创建了一个AWS API网关,并将其指向VPS。我希望能够对我的VPS启用客户端SSL身份验证。我在这里进行了AWS演练。我在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>

进一步的研究已经证明@Michael-sqlbot在这两方面都是正确的。在AWS API网关与第三方服务器端点通信之前,需要证书颁发机构的证书。

相关内容

  • 没有找到相关文章

最新更新