Want more timely Centmin Mod News Updates?
Become a Member

Featured Nginx How to use Brotli compression for Centmin Mod Nginx web servers

Discussion in 'Centmin Mod User Tutorials & Guides' started by eva2000, Mar 6, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    33,762
    7,469
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,482
    Local Time:
    8:42 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Informative Informative x 1
  2. bassie

    bassie Active Member

    808
    190
    43
    Apr 29, 2016
    Ratings:
    +572
    Local Time:
    12:42 AM
    Great .... new browser support but the main problem is more and more the fact that Nginx broti is not maintained anymore. Also no communication what so ever from the creator.

    https://github.com/google/ngx_brotli/issues
     
  3. eva2000

    eva2000 Administrator Staff Member

    33,762
    7,469
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,482
    Local Time:
    8:42 AM
    Nginx 1.13.x
    MariaDB 5.5
  4. bassie

    bassie Active Member

    808
    190
    43
    Apr 29, 2016
    Ratings:
    +572
    Local Time:
    12:42 AM

    Nothing against PiotrSikora.
    Very simple.
    If you don't have time don't start a project.
    But that's the most difficult kind of thing for a typical programmer.
    Planning and communicating.
     
  5. upgrade81

    upgrade81 Premium Member Premium Member

    107
    5
    18
    Sep 5, 2016
    Italy
    Ratings:
    +6
    Local Time:
    12:42 AM
    1.13.8
    10
    Which is the best method you use to restart nginx immediately after the overnight update of compressed files?

    I'm using this what do you say?
    Code (Text):
    10 5 * * * /root/tools/brotli/brotli.sh /home/nginx/domains/domainxxx.it/public/wp-content/themes/ "ngxrestart" > /dev/null 2>&1
     
  6. BamaStangGuy

    BamaStangGuy Active Member

    514
    148
    43
    May 25, 2014
    Ratings:
    +198
    Local Time:
    5:42 PM
    Cloudflare now offers this:

    Screenshot 2018-02-23 11.48.30.png
     
    • Like Like x 1
  7. eva2000

    eva2000 Administrator Staff Member

    33,762
    7,469
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,482
    Local Time:
    8:42 AM
    Nginx 1.13.x
    MariaDB 5.5
    that won't work on command line .. put then in a bash shell script and reference script in cronjob

    but probably not needed as once you enable Centmin Mod ngx_brotli, you can on the fly compress static text files using brotli compression. I do it on thsi forum and on centminmod.com site :)
     
  8. upgrade81

    upgrade81 Premium Member Premium Member

    107
    5
    18
    Sep 5, 2016
    Italy
    Ratings:
    +6
    Local Time:
    12:42 AM
    1.13.8
    10
    I understand, you mean the restart command that does not work, right?

    but I use both on the fly and static files that are still more compressed.
    It works that if it finds the static file skips the process on the fly, correct?
    in this way I take a lot less cpu
     
  9. eva2000

    eva2000 Administrator Staff Member

    33,762
    7,469
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,482
    Local Time:
    8:42 AM
    Nginx 1.13.x
    MariaDB 5.5
    you need to separate multiple commands on a single line with semi-column ;

    Code (Text):
    cmd1
    cmd2
    

    would be

    Code (Text):
    cmd1; cmd2
    


    Compression is only done once with static compressed files taken priority over on the fly. And yes static pre-compressed files uses less cpu resources.
     
  10. RoldanLT

    RoldanLT Well-Known Member

    4,157
    1,007
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,421
    Local Time:
    6:42 AM
    1.11
    10.2
    Why does it needs nginx restart?
     
  11. eva2000

    eva2000 Administrator Staff Member

    33,762
    7,469
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,482
    Local Time:
    8:42 AM
    Nginx 1.13.x
    MariaDB 5.5
    To clear any nginx caches.
     
    • Informative Informative x 1
  12. knguyen2015

    knguyen2015 New Member

    11
    1
    3
    Aug 27, 2017
    Ratings:
    +1
    Local Time:
    6:42 PM
    1.12.1
    15.1
    Do I need to disable gzip after enabling Brotli?
     
  13. eva2000

    eva2000 Administrator Staff Member

    33,762
    7,469
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,482
    Local Time:
    8:42 AM
    Nginx 1.13.x
    MariaDB 5.5
    no don't disable gzip, not all browsers support brotli so for those browsers nginx will fall back to gzip instead
     
..