【问题标题】:elasticbeanstalk ssl without custom domain没有自定义域的 elasticbeanstalk ssl
【发布时间】:2013-08-19 11:04:54
【问题描述】:

我正在尝试在托管在 Amazon Elastic Beanstalk 上的令牌自动售货机上启用 SSL。但是,如果我尝试启用端口 443 侦听器,它会告诉我需要 SSL 证书。

如果我有自己的域,这将是有意义的,但这是一个向移动应用程序分发令牌的系统机器。该 URL 的格式为 mytvm.elasticbeanstalk.com,最终用户永远不会看到,因此无需获取自定义域。

是否可以启用 SSL 而无需在自定义域名上进行设置?几乎我以前使用过的每台主机都有一个通配符 SSL 证书,用于您在其主主机的子域上运行的内容。换句话说,我希望亚马逊已经为*.elasticbeanstalk.com 设置了通配符证书。不是这样吗?

【问题讨论】:

  • +1。 2017 年 3 月,除了从 CA 获取官方证书然后将其上传到 AWS(使用 ACM 或直接使用 CLI)之外,仍然没有其他解决方案。如果您仍需要通过浏览器进行 https 访问,但不想要自定义域名,则使用自签名证书的 @onlymybest 解决方案将不起作用。

标签: ssl-certificate amazon amazon-elastic-beanstalk


【解决方案1】:

您的应用名称可以是您的“自定义域”, 即 mytvm.elasticbeanstalk.com。

如果您在弹性 beanstalk 应用程序中使用负载均衡器,您可以使用指示 here 并使用 openssl 创建您自己的证书。安装 openssl 和弹性 beanstalk 命令行界面后,您可以按照步骤输入域名为“mytvm.elasticbeanstalk.com”

使用以下命令:

C:\>openssl genrsa 1024 > privatekey.pem
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus....

C:\>openssl req -new -key privatekey.pem -out csr.pem
Loading 'screen' into random state - done
You are about to be asked to enter information that will be incorporated....

Country Name (2 letter code) [AU]:us
State or Province Name (full name) [Some-State]:yourstate
Locality Name (eg, city) []:cityname
Organization Name (eg, company) [Internet Widgits Pty Ltd]:youname
Organizational Unit Name (eg, section) []: your
Common Name (e.g. server FQDN or YOUR name) []:**mytvm.elasticbeanstalk.com**
...

C:\>openssl x509 -req -days 365 -in csr.pem -signkey privatekey.pem -out server.crt

C:\>iam-servercertupload -b server.crt -k privatekey.pem -s server -v

接下来将您的设置更改为使用 443。

【讨论】:

猜你喜欢
  • 2020-05-01
  • 2020-07-03
  • 2014-11-06
  • 2016-03-29
  • 2021-07-18
  • 2017-12-28
  • 2012-09-27
  • 2017-07-02
  • 2014-07-05
相关资源
最近更新 更多