How do I route Cloudfront with multiple origins?
9,530
Create a second distribution.
CloudFront can select the origin server based on path pattern matching only -- not the hostname, or other request parameters.
Related videos on Youtube
Author by
resting
Updated on September 18, 2022Comments
-
resting over 1 year
So I have 2 Wordpress sites hosted as such
http://siteA.mydomain.com
http://siteB.mydomain.com
I have a distribution created that has the 2 domains above as the origin.
siteA.mydomain.com
siteB.mydomain.com
I'm not sure how to configure the routes such that
http://siteA.mydomain.com/wp-content/*
will go to siteA's domain, andhttp://siteB.mydomain.com/wp-content/*
will go to siteB's as the path pattern is the same.Or should I create another distribution for siteB?