神秘的CloudFront“错误请求" [英] Mysterious CloudFront "Bad request"
问题描述
我已经建立了一个新的域和Web服务器,以及一个CloudFront发行版来为其提供服务.
I've set up a new domain and web server, and a CloudFront distribution to serve it.
CloudFront已成功在其自己的域中服务该站点:d1lnegrqin0up5.cloudfront.net
CloudFront is successfully serving the site on its own domain: d1lnegrqin0up5.cloudfront.net
我希望将mpe.io(不带www)转到Web服务器,并将www.mpe.io转到CloudFront发行版.因此,我为www.mpe.io设置了一个CNAME记录,指向上述CloudFront域.
I want mpe.io (without www) to go to the web server, and www.mpe.io to go to the CloudFront distribution. As such, I set up a CNAME record for www.mpe.io pointing to the aforementioned CloudFront domain.
我花了几个小时,然后www.mpe.io转到CloudFront(在结果页面上显示由cloudfront生成"),但是所有请求都简单,导致Bad Request ERROR.
I gave it a couple of hours, and www.mpe.io goes to CloudFront (it says "Generated by cloudfront" on the resulting pages) but all requests simple result in a Bad request ERROR.
请注意,如果我直接进入CloudFront域,一切正常.如何以与CloudFront域相同的方式使www.mpe.io成功提供文件?
Note that if I go directly to the CloudFront domain, everything works fine. How can I get www.mpe.io successfully serving files in the same way the CloudFront domain is?
详细信息:
域名DNS记录:
- 名称,TTL,类型,记录
- mpe.io.,3600,A,101.0.76.155
- www.mpe.io.,3600,CNAME,d1lnegrqin0up5.cloudfront.net
- *.mpe.io.,3600,A,101.0.76.155
分发设置:
- 投放方式:网络
- Cookie记录:关闭
- 分发状态:已部署
- 价格类别:使用所有边缘位置(最佳性能)
- 状态:已启用
- 备用域名(CNAME):-(这很重要吗?)
- SSL证书:默认CloudFront证书(* .cloudfront.net)
- 域名:d1lnegrqin0up5.cloudfront.net
- 自定义SSL客户端支持:-
- 默认根对象:/index
推荐答案
都很好!我在写问题时回答了我的问题.
All good! I answered my question as I was writing it.
该字段是有关发行版设置中的备用域名(CNAME)的字段.当我将www.mpe.io添加为其中之一并给它一些时间时,它最终可以正常工作.
It was that field regarding Alternate Domain Names (CNAMEs) in the distribution's settings. When I added www.mpe.io as one of them and gave it some time, it ended up working fine.
这篇关于神秘的CloudFront“错误请求"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!