1. 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.

Discussion in 'Troubleshooting and Problems' started by Mr.Rick, Dec 5, 2013.

  1. Mr.Rick

    Mr.Rick Active Member

    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:

    $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:
    rather than loading from:

    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.
  2. Adam Howard

    Adam Howard Well-Known Member


    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
  3. Mr.Rick

    Mr.Rick Active Member

    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?

  4. Adam Howard

    Adam Howard Well-Known Member

    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
  5. Mike

    Mike XenForo Developer Staff Member

    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.
    Adam Howard likes this.

Share This Page