How to make this work with CNAMEd cdn?

Thank you so much.

Now I have the actual big issue. Nginx doesn't seem to like LE generated certificates, or perhaps my conf file has wrong instructions? I've just lifted them from the web.