使用 1 个 S3 存储桶和 1 个 CloudFront 托管多个 angular 应用程序
Hosting multiple angular apps using 1 S3 bucket and 1 CloudFront
我计划在 1 个 AWS S3 存储桶和 1 个 AWS CloudFront 中托管多个 angular 应用程序?像这样。
AWS S3 存储桶
- /app1
- /app2
URL
- 示例。com/app1
- 示例。com/app2
在 AWS CloudFront 中,是否需要指定“默认根对象”?对于错误页面处理,我们如何设置,如果错误代码 403 来自 app1,则响应 /app1/error.html,如果来自 app2,则响应 /app2/error.html?
您可以使用 CloudFront 函数来根据需要更改请求 link。
这是一个文档 link
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-add-index.html
我计划在 1 个 AWS S3 存储桶和 1 个 AWS CloudFront 中托管多个 angular 应用程序?像这样。
AWS S3 存储桶
- /app1
- /app2
URL
- 示例。com/app1
- 示例。com/app2
在 AWS CloudFront 中,是否需要指定“默认根对象”?对于错误页面处理,我们如何设置,如果错误代码 403 来自 app1,则响应 /app1/error.html,如果来自 app2,则响应 /app2/error.html?
您可以使用 CloudFront 函数来根据需要更改请求 link。 这是一个文档 link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-add-index.html