static.xxx.tld

ChemicalKicks

Well-known member
Hopefully your search will lead you here.

So say you're set up static.xxxx.tld for your site because you've read somewhere you can get speed improvements. What do you actually need to do with your xenforo installtion?

How do you reference the static. domain? Where do you enter the filepaths?

For the love of all that's RICHARD DAWKINS how do I do it?
 
Add these to your library/config.php file:

Rich (BB code):
/**
 * Relative path to the thumbnails / avatars (etc.) directory from the base installation directory.
 * Must be web accessible and server-writable.
 * Examples 'data', 'foo/bar/data', '../path/to/thingy'.
 */
$config['externalDataPath'] = 'data';

/**
 * URL to the thumbnails /avatars (etc.) directory. Can be relative or absolute, but must
 * point to the web-accessible location referred-to by $externalDataPath.
 */
$config['externalDataUrl'] = 'data';

/**
 * URL to the location where XenForo's Javascript directories are located.
 * Can be absolute or relative.
 */
$config['javaScriptUrl'] = 'js';

If you want a cookie-free domain then you would specify a full URL for the last two settings and leave the first one alone. The cookie-free domain should be parked on the same site. You don't need to move any files. See this thread for reference.

For the style images you need to edit this setting to specify a full URL:

Admin CP -> Appearance -> Style Properties -> General -> Path to Images

The smilies also have their own individual paths:

Admin CP -> Home -> Smilies -> Edit
 
This is what I've done.

PHP:
/**
* Relative path to the thumbnails / avatars (etc.) directory from the base installation directory.
* Must be web accessible and server-writable.
* Examples 'data', 'foo/bar/data', '../path/to/thingy'.
*/
$config['externalDataPath'] = 'data';

/**
* URL to the thumbnails /avatars (etc.) directory. Can be relative or absolute, but must
* point to the web-accessible location referred-to by $externalDataPath.
*/
$config['externalDataUrl'] = 'http://static.the-sps.org/data';

/**
* URL to the location where XenForo's Javascript directories are located.
* Can be absolute or relative.
*/
$config['javaScriptUrl'] = 'http://static.the-sps.org/js';

Everything appears to be working.
 
Thank you for pointing me in the right direction.

So far I've edited the config as above and I've changed the relative path to point to the static domain in General Style Properties, is there anything else I need to do?
 
So far I've edited the config as above and I've changed the relative path to point to the static domain in General Style Properties, is there anything else I need to do?

Oh yeah. For the style images you need to edit this setting:

Admin CP -> Appearance -> Style Properties -> General -> Path to Images

The smilies also have their own individual paths:

Admin CP -> Home -> Smilies -> Edit

I have updated my original post.
 
Oh yeah. For the style images you need to edit this setting:

Admin CP -> Appearance -> Style Properties -> General -> Path to Images

Done this but I can see by the pingdom report a load of style stuff being served from my normal domain.

The smilies also have their own individual paths:

Admin CP -> Home -> Smilies -> Edit

I have updated my original post.

Thanks for that, I've updated all 30+ paths :eek:

:)
 
All of those images that are flagged by pingdom are showing correct on the forum itself. They are all being served from static.the-sps.org despite what that site says.

Maybe the results are cached. Or maybe it's using the Default style instead of the Infinite style somehow.
 
Top Bottom