【发布时间】:2021-03-30 10:39:44
【问题描述】:
我遇到了一个问题,我有两个单独的 Vue 项目正在部署(编译)到两个单独的 S3 存储桶,称为 ContentSite 和 DashboardSite。 ContentSite 的内容位于带有 index.html 的存储桶的根目录中。 Dashboard S3 存储桶的所有内容都在 dashboard 子目录中。所以喜欢DashboardSite/dashboard/index.html。
我还有一个 Cloudfront 发行版,它具有以下行为:
Default (*) --- ContenSite S3 Bucket
/dashboard/* --- DashboardSite S3 Bucket
当我尝试导航到我刚刚收到key not found 的网站时,问题出在我的 Vue 项目上。
当我浏览 / 时,如何配置我的 Cloudfront 分发以提供来自 ContentSite S3 Bucket 的内容,然后从 dashboard/* 提供来自 DashboardSite S3 Bucket 的内容并且让我的 Vue 路由仍然有效?
【问题讨论】:
标签: amazon-web-services vue.js amazon-s3 amazon-cloudfront