Data folder and CDN/No cookie domains

D.O.A.

Cadet
hi there.

Today I used the options in the xenforo config to move most of my images etc onto a CDN, not really paying attention to the fact most files for the arcade are in /data

Code:
# write it
$config['externalDataPath'] = '/srv/www/wxyz.domain/public_html/data';
# Yo, read it
$config['externalDataUrl'] = 'http://wxyz.domain/data';

This results in broken game images and the game files not being found. I do not see any options to specify a storage path in the arcade options, so I'm guessing there is not?
I assumed if anything, xenforo would handle the paths for the arcade and pass on any changes.

This is a example broken image path, so you can see where the arcade is trying to pull the images from, it's appending the file path.
forum.wxyz.domain/srv/www/wxyz.domain/public_html/data/games/0/Canabalt.jpg
There is also a $config 'javascript' line we can use in the config to offload js to a CDN, I'm not sure if this too would have an effect on the arcade, or if it uses what xenforo supplies.
 
Try something similar to this.

Code:
$config['externalDataPath'] = 'data';
$config['externalDataUrl'] = 'http://data.the-sps.net/data';
$config['javaScriptUrl']  = 'http://js.the-sps.net/js';

Note my main URL is The Self Preservation Society.

Try putting just 'data' in the external data path.
 
Try something similar to this.

Code:
$config['externalDataPath'] = 'data';
$config['externalDataUrl'] = 'http://data.the-sps.net/data';
$config['javaScriptUrl']  = 'http://js.the-sps.net/js';

Note my main URL is The Self Preservation Society.

Try putting just 'data' in the external data path.

Thanks, just tried that on my test board, cleared apc cache and the images and files are back, pointing at the default locations in xenforo /data ... all my avatars and thumbs are being served from the static domain, as required. I'll upload some games, avatars and stuff and make sure it's all good before I set this up on the live boards
D.O.A. can you send me your link?
my site is extremely NSFW, almost shock, so PM me if you'd like the link still
 
Thanks, just tried that on my test board, cleared apc cache and the images and files are back, pointing at the default locations in xenforo /data ... all my avatars and thumbs are being served from the static domain, as required. I'll upload some games, avatars and stuff and make sure it's all good before I set this up on the live boards

my site is extremely NSFW, almost shock, so PM me if you'd like the link still
Glad it's all working for me :smiley:

PC me your link, you should see some of the threads on mine lol
 
Is there an XF 'Help' page on setting up the CDN options? I'm browsing the official XF site but am not seeing anything explicitly. :blush:
 
Hey Kevin,

I started a thread about this a while ago on xf, here's the important info static.xxx.tld :smiley:
Thanks. What I'll likely be playing with at some point is setting up a cookie-free domain and then testing that configuration. With a half-dozen or so XF sites on the same server and all under my control I think I can get benefit out of the cookie-free domain.
 
Thanks. What I'll likely be playing with at some point is setting up a cookie-free domain and then testing that configuration. With a half-dozen or so XF sites on the same server and all under my control I think I can get benefit out of the cookie-free domain.
Speaking from experience, once you go down that road it does add extra complication to configuration especially if you're doing it with multiple sites.
 
Have you guys come up with a fix for this? My games won't save scores when served from cdn. Anyway to change the default path for xf arcade in the code?
 
Back
Top