In this article, we will walk through a static assets only CDN integration using XenForo.
This tutorial assumes that a Pull Zone has already been created.
XenForo Settings
-
Connect to the webserver and navigate to the XenForo library/config.php file.
-
Edit file config.php and add the following snippet, replacing "foo.bar.netdna-cdn.com" with the zone's custom CDN URL:
$config ['externalDataUrl'] = 'http://foo.bar.netdna-cdn.com/data'; $config ['javaScriptUrl'] = 'http://foo.bar.netdna-cdn.com/js';
-
Login to the XenForo admin area.
-
Navigate to Style -> General -> Settings.
-
Under field Path to images replace existing content (/styles/default) with following:
http://foo.bar.netdna-cdn.com/styles/default
-
Click on Update Style Properties to apply your settings.
-
All Done!
To ensure MaxCDN is implemented correctly, the source code of any page can be viewed to confirm that the CDN URL is being rewritten for static assets instead of your origin domain. Tools such as Pingdom can be utilized to provide a more detailed report on the status of the CDN implementation.
We hope this article was helpful and as always, If there are any questions or concerns about any of the topics mentioned in this article, please feel free to reach out to support - we are available 24/7 by chat or email!