Welcome to Centmin Mod Community
Become a Member

Beta Branch update inc/wpsetup.inc revise order redisupstream.conf & wpcacheenabl…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Aug 24, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:43 PM
    Nginx 1.13.x
    MariaDB 5.5
    update inc/wpsetup.inc revise order redisupstream.conf & wpcacheenabler_map.conf

    revise include files order in nginx.conf due to adding maps to them need to be positioned after the map_hash_bucket_size options otherwise get an error on nginx restart

    Code (Text):
    nginx: [emerg] "map_hash_bucket_size" directive is duplicate in /usr/local/nginx/conf/nginx.conf
    


    Continue reading...

    123.09beta01 branch

     
  2. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:43 PM
    Nginx 1.13.x
    MariaDB 5.5
    excerpt from revised nginx.conf's http{} context top part when centmin.sh menu option 22 is ran
    Code (Text):
    http {
    limit_req_zone $binary_remote_addr zone=xwprpc:10m rate=30r/s;
    
    include /usr/local/nginx/conf/brotli_inc.conf;
    map_hash_bucket_size 128;
    map_hash_max_size 4096;
    server_names_hash_bucket_size 128;
    server_names_hash_max_size 2048;
    
    limit_req_zone $binary_remote_addr zone=xwplogin:16m rate=40r/m;
    #limit_conn_zone $binary_remote_addr zone=xwpconlimit:16m;
    
    more_set_headers "Server: nginx centminmod";
    more_set_headers "X-Powered-By: centminmod";
    
    # uncomment cloudflare.conf include if using cloudflare for
    # server and/or vhost site
    #include /usr/local/nginx/conf/cloudflare.conf;
    include /usr/local/nginx/conf/maintenance.conf;
    include /usr/local/nginx/conf/vts_http.conf;
    include /usr/local/nginx/conf/geoip.conf;
    #include /usr/local/nginx/conf/pagespeedadmin.conf;
    include /usr/local/nginx/conf/fastcgi_param_https_map.conf;
    include /usr/local/nginx/conf/redisupstream.conf;
    include /usr/local/nginx/conf/wpcacheenabler_map.conf;

    contents of /usr/local/nginx/conf/wpcacheenabler_map.conf
    Code (Text):
    map $http_user_agent $cmwpcache_device {
        default                                     'desktop';
        ~*(iPad|iPhone|Android|IEMobile|Blackberry) 'mobile';
        "~*Firefox.*Mobile"                         'mobile';
        "~*ipod.*mobile"                            'mobile';
        "~*Opera\ Mini"                             'mobile';
        "~*Mobile"                                  'mobile';
        "~*Tablet"                                  'mobile';
    }