CNAME for CDN implementation

Posted July 24, 2013 6.9k views
Hi. I want to install a CDN and I set up a CNAME for like: s -> But, when I try to view, for example, a image from something like, It redirects me to (with 404 error, obviously). Any suggestion? PS: I am using nginx.
1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

3 answers
@daniellekwint: I don't see where Pablo's answer is incorrect? He's trying to help.
I added the following in my nginx site config, and problem fixed! But I am not sure if it's the correct way to solve the problem.

server {
listen 8080; (NOTE: I'm using varnish)
rewrite ^ $scheme://$uri;
Where are you managing your DNS? I'm not sure that any configuration needs to be made on the server, itself if you're using a third-party DNS provider, i.e. DigitalOcean's DNS Manager.
Submit an Answer