Pet*_*ter 10 ssl amazon-ec2 amazon-web-services amazon-elb
我在 AWS 弹性负载均衡器上安装 SSL 证书时遇到了一些困难。我有来自 GoDaddy 的通配符证书,需要将其指向 ELB。
我已经运行了命令(我在负载均衡器后面的一台服务器上运行了它):
openssl req -new -newkey rsa:2048 -nodes -keyout mydomain.key -out mydomain.csr
然后我已将 .csr 文件发送给 GoDaddy。此时,他们返回了一个 zip 文件夹,其中包含两个文件:gd_bundle.crt
和mydomain.com.crt
. gd_bundle.crt 在查看它时似乎有两个唯一的键(两个 base 64 编码的字符串)。
Amazon ELB 要求提供公钥和私钥,根据我所做的,我不确定哪个是什么。从这一点来看,我不知道该怎么做才能全部加载。
任何帮助将不胜感激。
私钥是您与 CSR 一起生成的 mydomain.key。
GoDaddy 发送给您的是公钥(证书文件 mydomain.com.crt,由 GoDaddy 签名),以及 GoDaddy 的中间证书链,用于完成您的证书与最终用户浏览器之间的信任链知道(gd_bundle.crt 文件)。
我对 ELB 不是特别熟悉,但查看此文档页面:
您将为私钥提供 mydomain.key 文件,为公钥提供 mydomain.com.crt 文件,为证书链提供 gd_bundle.crt 文件。
Setup instructions are found here: http://aws.amazon.com/cli/
# define these
crtdomain="example.com"
crtchain="gd_bundle.crt"
echo "converting to pem format"
openssl rsa -in ${crtdomain}.key -out aws-${crtdomain}.key
openssl x509 -in ${crtdomain}.crt -out aws-${crtdomain}.crt -outform PEM
echo "uploading certificate ${crtdomain} to Amazon"
aws iam upload-server-certificate \
--certificate-body file://aws-${crtdomain}.crt \
--private-key file://aws-${crtdomain}.key \
--certificate-chain file://${crtchain} \
--server-certificate-name ${crtdomain}
Run Code Online (Sandbox Code Playgroud)
source: http://brakertech.com/ec2-elb-godaddy-cert/