在amazon ec2上安装godaddy ssl证书

我是新来build立ssl证书和csr,我想在公共ip中使用公共ip代替域名。 我使用以下命令和信息创build了一个csr文件

openssl req -new -newkey rsa:2048 -nodes -keyout mydomain.key -out mydomain.csr Generating a 2048 bit RSA private key .....................+++ ...........................................+++ writing new private key to 'mydomain.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:IN State or Province Name (full name) [Some-State]:Delhi Locality Name (eg, city) []:Delhi Organization Name (eg, company) [Internet Widgits Pty Ltd]:MyComp ITES pvt ltd Organizational Unit Name (eg, section) []:chatapp Common Name (eg server FQDN or YOUR name) []:123.123.123.12(Elastic IP) Email Address []:[email protected] Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: 

这个命令生成两个文件

1.mydomain.key

2.mydomain.csr

我从mydomain.csr复制所有文本并粘贴到godaddy证书签名请求(CSR),但它给我错误

 Public IP addresses are not allowed. 

任何人可以帮助我什么是错的,我怎么能解决这个错误。

通常情况下,您不能使用IP地址作为主题名称获取SSL证书。

首先,除非IP块已经委托给你(例如来自RIR),否则你没有任何可以获得这种证书的基础。 这意味着,除非您在该IP块的whois信息中列出并命名,否则您将不会获得证书。

其次,即使在这种情况下,并非所有的authentication机构都会这样做。

从这个意义上说,你的弹性IP有点像一个子域。 它可供您使用,并在您的提供商范围内与您相关联,但就ICANN及其后代而言,这不属于您的。

其他答案似乎是正确的,但他们可能会错过这一点。 在我看来,真正的答案是不这样做

我无法想象一个需要你保护任意IP地址的用例; 其他答案中提到的所有好理由似乎都是一个坏主意。 您将失去将DNS名称与首先devise的IP地址分开的灵活性。

你应该只注册一个证书到你拥有的任意子域,完全绕过这个问题,而不是违背谷物,试图绕过这个问题。

通用名称必须是您要申请证书的域的FQDN。
例如www.example.com

它不能是一个IP地址。