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.
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.
发布评论
评论(3)
不,这是不可能的。
查看此 Amazon 线程
还有这个
Nope this is not possible.
See this Amazon thread
And this one
如前所述,这不是直接可行的,但您可以在 EC2 实例上设置 Apache 或 nginx + SSL,将您所需的域 CNAME 到该实例,然后反向代理到(非自定义域)S3 URL。
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.
刚刚在 - 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”
将“//”作为第一部分告诉浏览器使用当前使用的任何协议。只要浏览器请求 HTTP 或 HTTPS(当您在线时总是如此),这种方法就非常有效。唯一不适用的情况是当您为本地开发使用 FILE 协议时。付出的代价很小。只需进行搜索/替换即可。
“s3.amazonaws.com”是 Amazon S3 Web 服务的实际域名,并为其定义了 SSL 密钥,然后将您的存储桶和密钥放在该点之后效果很好。
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.