如何CloudFront的适用于动态应用在EC2 PHP? [英] How CloudFront works with Dynamic Application in EC2 PHP?
问题描述
如何CloudFront的适用于动态应用程序?是否需要设置不同的域?一个动态,一个是静态的?或configurate在CloudFront的,因此它可以与所有的动态功能的工作(例如,提交反馈)?
How CloudFront works with Dynamic Application? Does it need to setup different domains? One for dynamic, one for static? or configurate in the CloudFront so it can work with all the dynamic functions (ex. submit a feedback)?
谢谢!
推荐答案
您应该使用CloudFront的提供您喜欢的图像,样式表和脚本,甚至静态HTML网站的静态内容。您的应用程序的动态部分发生在您的EC2实例的地方。
You should use CloudFront to deliver your static content like images, stylesheets and scripts or even static HTML sites. The dynamic part of your application takes place on your EC2 instance.
要做到这一点最简单的方法,就是要建立像 static.example.com
子站点相应的CNAME条目指向的CloudFront的分布领域。另外别忘了告诉匹配CNAMES到您的CloudFront的分布。欲了解更多信息,看看这个:亚马逊CloudFront的 - 使用备用域名(的CNAME)一>
The easiest way to do this, is to setup a subdomain like static.example.com
with the corresponding CNAME entry which points to the CloudFront distribution domain. Also don't forget to tell the matching CNAMES to your CloudFront distribution. For more information look at this: Amazon CloudFront - Using Alternate Domain Names (CNAMEs).
这篇关于如何CloudFront的适用于动态应用在EC2 PHP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!