How do I set up a CDN using a cookieless domain?

cmeinck

Well-known member
My site is plenty fast, but it doesn't perform well using Google's Pagespeed due to all the javascript (ads and such). I had this setup before, but cannot figure out how to configure it on my new server.

Here's where I'm at:
  • My domain is mysite.com
  • I have setup mysite.org in WHM
  • I have setup a Push zone at MaxCDN
  • I have static.mysite.org IN CNAME to the custom domain provided by MaxCDN
  • In XF, I've added this to my config:
Code:
$config['externalDataUrl'] = 'http://static.mysite.org/data';
$config['javaScriptUrl']  = 'http://static.mysite.org/js';

I haven't moved any files at all and haven't uploaded anything to static.mysite.org.
When I do the above setup, I get all missing images.
Any suggestions?
 
You should have both domains on the same server.

Setup a syslink to /data/ as content within it is randomly generated.
 
You should have both domains on the same server.

Setup a syslink to /data/ as content within it is randomly generated.

Is this something I can ask my host to do? Would there be any changes to my above configuration at MaxCDN, in my config file or on my server DNS?

Thanks. So confused by it all.
 
Is this something I can ask my host to do? Would there be any changes to my above configuration at MaxCDN, in my config file or on my server DNS?

Thanks. So confused by it all.
Assuming you have cPanel, yes, this is something you will want your cost to do for you.

MaxCDN should require no changes on your config file. You should have a pull zone for both your domain and your static domain name.
 
When I setup a symlink, where does the actual data get stored? Is everything still on my main .com server? I'm hesitant to ask my host to start moving things, for fear I'll lose my data/avatars/images.

Thanks.
 
Top Bottom