繁体   English   中英

Apache配置AWS API Gateway证书

[英]Apache configuration AWS API Gateway certificates

我创建了一个AWS API Gateway,并将其指向VPS。 我希望能够对我的VPS启用客户端SSL身份验证。 我在这里遵循了AWS演练。 我在API Gateway控制台中生成了PEM编码的证书,并将其复制到我的Apache Web服务器。 看来证书和/或虚拟主机配置正在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 Gateway与第三方服务器终端进行通信之前,需要来自证书颁发机构的证书。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM