I have a cloudfront distribution with custom domain, say www.x.com, which is listed in alternative domain name in the distribution.
The origin that I wanted it to forward to is an ELB, with a HTTPS listener which has www.x.com cert on it.
The origin domain is the ELB dns name (xxxx.ap-east-1.elb.amazonaws.com) - I can't put another subdomain there for some other reason.
I was following suggestion that on the behavior page, we can forward the header (Host) header so it will be able to authenticate the cert. However I keep having problem that Cloudfront says unable to contact the origin.
Is there a way to solve this beside using subdomain to point to that ELB? Does forwarding Host / Origin header is not enough?