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

XF 1.4 Issue with config.php and CDN

Discussion in 'Troubleshooting and Problems' started by Betclever, Apr 1, 2015.

  1. Betclever

    Betclever Active Member

    Hello all,

    I made a subdomain and put this there => $config['javaScriptUrl'] = 'mysubdomain/js'; and add this one to the config.php file.

    However, when I add this one, I have a big bug on the forum and JS doesn't load...
    I have transferred JS to the root of the subdomain and tried under public_html too.
    Under the CP and performances, I have checked local hosting cause the box "google API Ajax" was checked but no change...

    What's wrong in this case?

    Thanks for your help.
    PS: I will add the data line after the JS line but the data folder is really big and I want to test first with the JS folder...

    Attached Files:

    Last edited: Apr 1, 2015
  2. MattW

    MattW Well-Known Member

    What happens when you go to the subdomain directly at put in the full URL of the java script? Does it actually load anything?
  3. Betclever

    Betclever Active Member

    Nothing but the folder is empty a part the JS one.
    Shall I transfer anything in addition of the JS folder?

    I know, I can transfer the data folder but before transferring this one, I want to make a test with the JS one cause this one is not too heavy...



    It works now, I don't know why but I don't have bugs anymore.

    However, can I transfer the styles folder too?
  4. MattW

    MattW Well-Known Member

    Yes, styles and data can be moved / copied over.
  5. Betclever

    Betclever Active Member

    When I make change like installing add-on or change, must I do transfer files to the subdomain and the domain or only in the subdomain folders?
  6. MattW

    MattW Well-Known Member

    You need to ensure the folders are synced. So if you update the theme, you need to upload the style files to both places. Same for the JS files.
  7. Betclever

    Betclever Active Member

    Hum ok, good to know.
    However, I got another question:

    If I made this subdomain and moving some folders to the subdomain, it is to optimize my website and the loading page.
    Therefore, is it a good way to use my own subdomain and not a website like cloudfare or something like that?

    I have changed to local hosting instead Google API Ajax under performances.
  8. MattW

    MattW Well-Known Member

    It depends. How fast is your server? A proper CDN would in theory be better, as it would serve the content from a node closest to the end user. However, from my own experience, I've always found it slower than my own server.

    Having them on your own subdomain isn't going to make much difference, because it's still on the same TLD. Ideally, you want it on a different TLD which will make it cookieless.

    In my own case, I had the forums at mattwservices.co.uk and the static content served from mattwservices.uk
  9. Betclever

    Betclever Active Member

    Ah ok, I have a VPS with 3 cores, 30gb data stockage "SSD" and 3gb ram and traffic and hits unlimited for 44,99€/month.
    I got another question, I did the same for the data folder but the CSS doesn't load, any reason?

    I used the same CDN address => $config['externalDataUrl'] = 'http://cdn1.bet-clever.com/data';

    I have copied this one to the subdomain too under public_html

    Thanks for your help.

Share This Page