1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Server Configuration and Hosting' started by cmeinck, Dec 7, 2012.

  1. cmeinck

    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:
    $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?
  2. Adam Howard

    Adam Howard Well-Known Member

    You should have both domains on the same server.

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

    cmeinck Well-Known Member

    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.
  4. Adam Howard

    Adam Howard Well-Known Member

    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.
  5. cmeinck

    cmeinck Well-Known Member

    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.


Share This Page