Passer au contenu

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?

demandé il y a 6 ans832 vues
1 réponse
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.

répondu il y a 6 ans
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.