跳至內容

Using Lightsail with Cloudfront

0

I've previously used Cloudfront with S3 and also with WordPress sites hosted on Lightsail. I'm now trying to set up a Cloudfront distribution for standard websites (non WordPress) hosted on Lightsail, (without a Load Balancer). I note that the Cloudfront distribution seems to hit the 'default' Lightsail page (This can be the Plesk default page if you're using Plesk or the default website - if you have set one as default). There doesn't seem to be any way of targeting a second or third site hosted on the Lightsail instance with a Cloudfront distribution. Does this mean I can only have one Cloudfront distribution for a single site on a Lightsail instance or has anyone come across a workaround?

已提問 6 年前檢視次數 833 次
1 個回答
0

The answer is to amend the CloudFront distribution to Whitelist HTTP headers. You can then choose to forward the Host header from CloudFront to your origin.

已回答 6 年前
  • how do you do this in lightsail? edit the way you do this with lightsail is in your distribution's Directory and file overrides, you need to specify path to directories to NOT CACHE. files in those directories seem to recieve full http headers and for webhooks shouldnt be cached anyways.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。