Discover Centmin Mod today
Register Now

Concat working on Centmin beta09

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by EckyBrazzz, Oct 3, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    699
    139
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +258
    Local Time:
    11:19 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    Is this still working on beta09?

    Concat | NGINX


    As described here : Nginx - CentminMod.com LEMP Nginx web stack for CentOS
    Code (Text):
        location /css {
           concat on;
           concat_max_files 20;
       add_header Pragma public;
       add_header Cache-Control "public, must-revalidate, proxy-revalidate";
       access_log off;
       expires 30d;
           }
    
           location /js {
           concat on;
           concat_max_files 20;
       add_header Pragma private;
       add_header Cache-Control "private, must-revalidate, proxy-revalidate";
       access_log off;
       expires 30d;
           }
    
     
  2. rdan

    rdan Well-Known Member

    4,671
    1,121
    113
    May 25, 2014
    Ratings:
    +1,663
    Local Time:
    10:19 PM
    Mainline
    10.2
    This isn't advisable on HTTP/2 usage.
     
    • Informative Informative x 1
  3. EckyBrazzz

    EckyBrazzz Active Member

    699
    139
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +258
    Local Time:
    11:19 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
  4. eva2000

    eva2000 Administrator Staff Member

    41,723
    9,395
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,431
    Local Time:
    12:19 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    last i checked it still worked though you'd have to test whether it's beneficial to your specific assets you're loading over HTTP/2 HTTPS

    i don't use concat nginx module much as only time you can use it is if you can control and know what css/js files are being served i.e. very static site as opposed to dynamic scripted sites where web app generates the css/js url and/or cache breaking query strings
     
    • Informative Informative x 1
  5. EckyBrazzz

    EckyBrazzz Active Member

    699
    139
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +258
    Local Time:
    11:19 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    Tested it but ain't working anymore.
    Code (Text):
    =========================================
    nginx -t
    nginx: [emerg] unknown directive "concat" in /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:125
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    
     
  6. eva2000

    eva2000 Administrator Staff Member

    41,723
    9,395
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,431
    Local Time:
    12:19 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    does nginx -V show concat module ? would need nginx upgrade log to see if nginx upgraded/recompiled with it Install - Nginx - How to troubleshoot Nginx installs/upgrades when you set NGINX_HTTPCONCAT='y' in persistent config file /etc/centminmod/custom_config.inc prior to centmin.sh menu option 4 recompiles of nginx. By default NGINX_HTTPCONCAT='n' is set. Guess need to update documentation at https://centminmod.com/nginx.html#httpconcat as 123.09beta01 changed it to disabled by default unlike previous versions

    according to centmin.sh's commit blame history NGINX_HTTPCONCAT was set to n 4yrs ago

    set NGINX_HTTPCONCAT='y' in persistent config file /etc/centminmod/custom_config.inc prior to centmin.sh menu option 4 recompiles of nginx will show --add-module=../nginx-http-concat-master in nginx -V output
    working fine here with one.css and two.css containing 1 and 2 respectively
    Code (Text):
    ls -lah csstest/
    total 16K
    drwxr-sr-x   2 nginx nginx 4.0K Oct  5 23:38 .
    drwxr-sr-x. 19 nginx nginx 4.0K Oct  5 23:38 ..
    -rw-r--r--   1 nginx nginx    2 Oct  5 23:38 one.css
    -rw-r--r--   1 nginx nginx    2 Oct  5 23:38 two.css
    

    Code (Text):
            location /csstest {
            concat on;
            concat_max_files 20;
            }
    

    Code (Text):
    curl -s https://domain.com/csstest/??one.css,two.css
    1
    2
    
     
  7. EckyBrazzz

    EckyBrazzz Active Member

    699
    139
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +258
    Local Time:
    11:19 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    Guess I need some new glasses to read, did read in my nginx -V --with-compat. Just a letter :LOL:

    Compile it with the NGINX_HTTPCONCAT='y' now.
     
  8. EckyBrazzz

    EckyBrazzz Active Member

    699
    139
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +258
    Local Time:
    11:19 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    Well, it works, got super fast loading times:)... But better keep with old settings, as it breaks some parts of the site I tested it. (slider and some other options) But the slider was always a problem on this site. Think going to replace it with a other slider.
     
    Last edited: Oct 6, 2019