将GoDaddy SSL证书安装到AWS EC2

时间:2020-02-27 07:58:58

标签: amazon-web-services ssl amazon-ec2

我已经从goDaddy购买了针对我的域的SSL证书(也是从那里购买的)。购买期间,我得到了两个文件generated-csr.txtgenerated-private-key.txt,在购买结束时,我得到了一个包含三个文件的zip文件

   1. SomeRandomeString.crt
   2. SomeRandomeString.pem
   3. gd_bundle.crt

现在,我想在映射我的域的AWS ec2上安装此SSL证书。我将所有五个文件上传到/etc/ssl/myfolder。我已经安装了apache,所以我转到/etc/apache2/sites-available并打开了default-ssl.conf文件。开始时,我添加了与域相关的信息,例如

 ServerName mydomain.live
 DocumentRoot /var/www/html/my-site 

对于SSL,我看到了三个设置选项

 SSLCertificateFile /etc/ssl/myfolder/SomeRandomeString.crt.crt
 SSLCertificateKeyFile /etc/ssl/myfolder/generated-private-key.key (I got this file during purchase process with a `.txt` so I renamed the extension with `.key`.
 SSLCertificateChainFile /etc/ssl/fertapp/gd_bundle.crt

我运行了sudo a2ensite default-ssl.conf并重新启动了Apache。但是当我尝试使用https访问mydomain.live时,我得到了

This site can’t provide a secure connection
mydomain.live sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

有人可以告诉我我在这里做错了什么吗?我有什么想念的吗?我已经找到了两个问题aws EC2 install SSL certificate from GodaddyInstalling an ssl certificate with godaddy,但都与我的问题无关。

0 个答案:

没有答案