简体   繁体   中英

HTTPS Certificate on Amazon EC2

Section "Step 2: Obtain a CA-signed Certificate" from here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-an-instance.html

explains in detail how to get a TLS certificate from a CA. However, I have a confusion:

How will the certificate work, if I create it based on a custom domain (example.com), and the EC2's instance domain is an ephemeral one of type " http://ec2-34354-us-west2 ..."?

Maybe it's worth to note that I do not intend to use it with Apache HTTP Server, but with Glassfish (JavaEE application server) -- but I do not think this makes a difference.

I imagine that example.com will point to http://ec2 ... via a domain forwarding. Will it work if I simply forward https://www.example.com to https://ec2 ... ? I doubt it, since the browser should be able to tell that the certificate is for example.com and a forwarding is being tried to a domain which is not actually secure.

The certificate has to match the domain that is in the browser's address bar. You will be serving that domain from your EC2 server. It doesn't matter that your EC2 server will also have some ec2... domain name. As long as you are pointing your custom domain (that matches the SSL Certificate) to the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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