Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 and pointing to the original cdn url.

But probably because of my nginx vhost file when I run, 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.

share|improve this question
CNAMEs do not configure your web server for you. You need to setup a vhost for the address. – gparent May 6 '12 at 21:38

No chances are your DNS is still cached so it is still hitting your webserver and not the CDN's server. Make sure your dns is resolving correctly on your computer


If it is make sure you have no hosts entry hardcoding the cdn host to an IP since your browser will use that before asking DNS for the IP.

share|improve this answer
nop not added anything in vhost for the .. – Ayaz Malik Apr 30 '12 at 20:14

If you're planning to redirect to your CDN url, you'll need to add a CNAME entry from your DNS control panel. Something to the effect of:

cdn    IN    CNAME

You don't need to configure any vhost at your end.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.