i've setup magento CE 1.7.0.2 on a webserver nginx on 12.04 ubuntu cloud server. i've change configuration in order to use cdn for media, skin and js but i have some issues. for instance i can't upload new images for the product. no error shown, but the link of image is broken. i've just started using magento so maybe i'm doing something wrong but can't figure out what.
3 Answers
Some elements of the image uploader and the wysiwyg content editor are served from within your ‘skin’ directory – which is now served from your CDN, and will start throwing cross domain errors.
The Unsecure URL settings configured in the default config (top left) in the admin section. Are global – they affect all the stores and the admin area. In order to disable the CDN on the admin, but keep it for the website, change the scope of your configuration to Main Website (top left), uncheck the ‘Use Default’ settings, and then add in the CDN urls.
So under Current Configuration Scope: Default config you should use ;
http://www.yourdomain.com/
Under Current Configuration Scope: Main Website and default store view you should use
http://cname.yourdomain.com/
they should look like this
I’ve created Cname records to map to the cdn url’s (it’s neater) but you can just use the cdn urls if you prefer.
You can see a full explanation of the fix here
If you're using a CDN url for your javascript (eg: cdn1.example.com) it might be a crossdomain issue. Javascript won't be executed when the source is on a different domain. This might help: http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html
If you're using a different kind of CDN, please tell us what kind of extension you're using for that. For example OnePica
-
my mistake, i thouught was good out of the box. i'll use OnePica_ImageCdn.many thanks Commented Sep 4, 2013 at 16:19
This is a bug in Magento and should be fixed
The location of the SWF for uploading should be harcoded to the current domain (bug reported and acknowledged)
There are some more locations where this can cause a problem