Learn about Centmin Mod LEMP Stack today
Become a Member

Xenforo XenForo 2.1 CDN using Cloudflare free plan :D

Discussion in 'Forum software usage' started by rdan, Oct 7, 2019.

  1. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    7:11 AM
    @rdan can you share your nginx with filter module, i tried but not working.

     
  2. rdan

    rdan Well-Known Member

    5,438
    1,396
    113
    May 25, 2014
    Ratings:
    +2,184
    Local Time:
    10:11 PM
    Mainline
    10.2
    Something like this:
    Code:
        ### Sub Filter
        sub_filter_last_modified on;
        sub_filter_once off;
    
        sub_filter 'src="/proxy.php' 'src="https://xf2-cdn.net/proxy.php';
        sub_filter 'src="/styles/'   'src="https://xf2-cdn.net/styles/';
    
        sub_filter 'href="https://xf2.com/attachments/' 'href="https://xf2-cdn.net/attachments/';
        sub_filter 'src="https://xf2.com/attachments/'   'src="https://xf2-cdn.net/attachments/';
    
     
  3. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    7:11 AM
    Thanks, some how I did the same last time but doesn't work.
     
  4. rdan

    rdan Well-Known Member

    5,438
    1,396
    113
    May 25, 2014
    Ratings:
    +2,184
    Local Time:
    10:11 PM
    Mainline
    10.2
    Put it above all your location block.
    Under server block.
     
  5. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    7:11 AM
    Got it, I also need to disable gzip in XF configuration.
     
  6. rdan

    rdan Well-Known Member

    5,438
    1,396
    113
    May 25, 2014
    Ratings:
    +2,184
    Local Time:
    10:11 PM
    Mainline
    10.2
    Ah yeah I have that disabled years ago.