开发者

Use an HTTPS Cert with bucket as a domain name on Amazon S3 [closed]

Closed. This question is off-开发者_如何学编程topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 9 years ago.

Improve this question

I created a bucket similar to "mycdn.mysite.com" on Amazon-s3, as expected the files are available using that http://mycdn.mysite.com/files/foo.gif.

This works fine with http, I would like to somehow add a SSL certificate so that the files are served up via https, similar to https://mycdn.mysite.com/files/foo.gif.

Is it possible to add a certificate to Amazon-S3 that maps to a bucket name?


Nope this is not possible.

See this Amazon thread

And this one


As previously stated, it's not directly possible, but you can set up Apache or nginx + SSL on a EC2 instance, CNAME your desired domain to that, and reverse-proxy to the (non-custom domain) S3 URL.


Just found a solution at - http://joonhachu.blogspot.com/2010/09/helpful-tip-for-amazon-s3-urls-for-ssl.html

img src="//s3.amazonaws.com/www.mysite.com/images/logo.gif"

Placing the "//" as the first part tells the browser to use whatever protocol its currently using. This works great as long as the browser is requesting HTTP or HTTPS which it always is when you have it online. Only time it isn't is when you are doing FILE protocol for local development. Small price to pay. Just do a search/replace big whoop.

The "s3.amazonaws.com" is the actual domain name of Amazon S3 web services and has an SSL key defined for it then placing your bucket and key after that point works great.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜