Hi.
I want to install a CDN and I set up a CNAME for mydomain.com like:
s -> mydomain.netdna-cdn.com.
But, when I try to view, for example, a image from something like http://s.mydomain.com/image.jpg, It redirects me to http://s.myDEFAULT_FIRST_DIGITAL_OCEANdomain.com/image.jpg (with 404 error, obviously).
Any suggestion?
PS: I am using nginx.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
@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. <br> <br>server { <br> listen 8080; (NOTE: I’m using varnish) <br> server_name s.mydomain.com; <br> rewrite ^ $scheme://mydomain.netdna-cdn.com$uri; <br>}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.