I am using AWS EC2 to host my WP site having cyberpanel (Litespeed Ent and LScache plugin). Using free Let's SSL certificate (certbot).
I tried to active AWS cloudfront CDN on my site but getting following error
Below is screenshot of my various setting
I am using Public DNS as my origin domain
Generated the SSL in AWS certificate and applied here. Added cdn.domain.tld as alternate domain name and added it as cname pointing to distribution in route53
Default Cache Behavior Setting
I am not sure what I am doing wrong here?
Note: I have TLS v1.3 enabled in my Litespeed
Ok, I found the Solution. I was doing some mistakes.
I have SSL certificate for mydomain and its www version only. No wildcard SSL. And I was adding cdn.mydomain.tld
as Alternate domain names which have no valid SSL.
So I changed Alternate domain names to mydomain.tld
and www.mydomain.tld
and it started working.
Also, the SSL certificate that I generated in ACM was wrong, I added *.mydomain.tld
as domain name, But I had to add mydomain.tld
also, which I did and it solved the problem
Hope this help someone and he/she does not make silly mistake like me
Thanks @Michael-sqlbot and Jeff from jeffreyeverhart.com for pointing me in right direction.