• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Trying to use CDN with Styles -- Not Working.

Mr.Rick

Active member
#1
On my site, http://rcforumz.com, I am trying to use a CDN to cache static images.

What I've done is the following:

Added these lines to my config.php:

PHP:
$config['javaScriptUrl'] = 'http://cdn.forumediainc.com/rcf/xenforo/js';
$config['externalDataUrl'] = 'http://cdn.forumediainc.com/rcf/xenforo/data';
$config['externalDataPath'] = '/home/rcforumz/www/data';
Then I went into Appearance => Styles => Style Properties => General => Path to images
and entered: http://cdn.forumediainc.com/rcf/xenforo/styles/default/ and saved it.

After that I tried force refreshing the page and the images are still loading from their regular spot rather than from the CDN.

For example, the node-sprite.png shows as being loaded from:
http://rcforumz.com/styles/default/xenforo/rcforumz/node-sprite.png
rather than loading from:
http://cdn.forumediainc.com/rcf/xenforo/styles/default/xenforo/rcforumz/node-sprite.png

Both URLs work fine, but the non-CDN one is being used.

Could anyone point me in the direction of what I am doing wrong?

Thank you.
 

Adam Howard

Well-known member
#2
cdn.forumediainc.com

403 forbidden.

That's your problem right there. Make sure your dns is updated for the new dns sub domain

And if you're using any system links make sure the sub domain folder and links have the proper permission setting of 755
 

Mr.Rick

Active member
#3
cdn.forumediainc.com

403 forbidden.

That's your problem right there. Make sure your dns is updated for the new dns sub domain

And if you're using any system links make sure the sub domain folder and links have the proper permission setting of 755
Thanks for helping but I don't think that's the problem (403 Forbidden) -- if you check my original post, I put both link versions of the same image, one with CDN, and without CDN, and I am able to access both from my end. Wouldn't that mean that the 403 Forbidden at cdn.forumediainc.com doesn't apply?

Thanks.
 

Adam Howard

Well-known member
#4
Thanks for helping but I don't think that's the problem (403 Forbidden) -- if you check my original post, I put both link versions of the same image, one with CDN, and without CDN, and I am able to access both from my end. Wouldn't that mean that the 403 Forbidden at cdn.forumediainc.com doesn't apply?

Thanks.
No, it would still apply. That 403 is something you need to correct.



off topic: I've answered this question before from you once, have I not? Having a deja vu feeling
 

Mike

XenForo developer
Staff member
#5
Without seeing what you changed exactly, I'd have to guess that you have multiple styles (one disabled) and you changed the wrong one? (Or the child style already has the image path customized.)

Or that you changed the node sprite image URL already and removed the imagePath property reference from it.