CloudFront + WhiteNoise:无法加载资源:服务器响应状态为 404(未找到);

CloudFront + WhiteNoise : Failed to load resource: the server responded with a status of 404 (Not Found) ;

我正在使用 Django 和 WhiteNoise。 在 dailyhn.com 的索引页上,没问题。 但是当我访问左侧面板上的子页面时,会出现这样的错误。 加载资源失败:服务器响应状态为 404(未找到); http://www.dailyhn.com/news/2016/01/08/d3urtm1uacryxt.cloudfront.net/static/bootstrap-3.3.6/css/bootstrap.min.2f624089c65f.css

以前任何人都遇到过这个问题。我搜索了整个网络以及 Amazon CloudFront + Django WhiteNoise 文档,但找不到合适的解决方案。

我在这里解释了 STATIC_HOST 设置的问题:https://github.com/evansd/whitenoise/issues/61#issuecomment-170504687

这里有关于如何配置 CloudFront 的说明: http://whitenoise.evans.io/en/latest/django.html#instructions-for-amazon-cloudfront