Adding CNAME entry to nginx for cdn rewrite

Posted by Ayaz Malik on Server Fault See other posts from Server Fault or by Ayaz Malik
Published on 2012-04-30T12:15:05Z Indexed on 2013/11/11 15:59 UTC
Read the original article Hit count: 405

Filed under:
|

I am using apache + nginx (for serving static content) and just bought a CDN. I have added a CNAME entry to my CDN URL, which should be cdn.example.com and pointing to the original cdn url. xxx.netdna-cdn.com/

But probably because of my nginx vhost file when I run cdn.example.com, it opens the first server entry site in my vhost file.

I have multiple sites in my server. I have added CNAME from CPanel DNS editor as well.

No luck, so I think I need to add something in the vhost.conf.

© Server Fault or respective owner

Related posts about nginx

Related posts about cname-record