XF 2.1 Setting up a CDN for 2.1

Movie Prop Sites

Active member
KeyCDN has a great instruction set for setting up a CDN under Xenforo 1.x but no instructions for 2.x and the 1.x instructions don't work (just makes all the dropdowns act strangely if you put in lines they suggest to the config file. Is there a clear set of instructions for how to setup a Xenforo 2.x site to use a CDN?
 
So... I now have an answer to my own question.

Per KeyCDN you want to add these two lines to config.php

Code:
$config['externalDataUrl'] = 'http://yourzone-ab12.kxcdn.com/data';
$config['javaScriptUrl'] = 'http://yourzone-ab12.kxcdn.com/js';

However, that didn't work for us. We had to alter two things:

1) Because we are using SSL we had to change http to https
2) Because our forums are at /forums and not in the root we had to add /forums to the end of the string. Our final lines look like this:

Code:
$config['externalDataUrl'] = 'https://yourzone-ab12.kxcdn.com/forums/data';
$config['javaScriptUrl'] = 'https://yourzone-ab12.kxcdn.com/forums/js';

Hope this helps anyone else moving forward.
 
Top Bottom