Want more timely Centmin Mod News Updates?
Become a Member

Wordpress Install Powered Cache By SKOP, Mustafa Uysal

Discussion in 'Blogs & CMS usage' started by EckyBrazzz, Aug 11, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +256
    Local Time:
    5:26 AM
    1.17.x
    10.3.x
    Hi there,

    I want to install Powered Cache, it resolves a part of Memcached and works nice. Cuts down a 100ms load time now, but I guess with the alteration of the conf.ssl it would even give a little more.

    But it wants you to alter your conf.ssl file, and that gives me errors.

    I don't know on what place to add the configuration, so any advice ?

    Please give a working workaround also on paste.ee

    To keep it clean here I placed these files on paste.ee

    https://paste.ee/p/HShG7#3EIh2D0MoerE7yrilPVHRedryxlFQGup
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,646
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    6:26 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    comment out with hash
    Code (Text):
     #include /usr/local/nginx/conf/wpincludes/domain.com/wpfastcgicache_include_domain.com.conf;
    

    create your own /usr/local/nginx/conf/wpincludes/domain.com/poweredcache_include_domain.com.conf with contents of powered cache config in your first pastee file

    then edit nginx domain.com.ssl.conf

    but you have a bug you location / content is missing for
    Code (Text):
      include /usr/local/nginx/conf/503include-only.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args; 
    
      # Wordpress fastcgi_cache
       try_files $uri $uri/ /index.php?$args;
    
      # Wordpress Permalinks
       #try_files $uri $uri/ /index.php?q=$uri&$args;
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    
    

    it should be wrapped in
    Code (Text):
    location / {
    
    }

    so
    Code (Text):
    location / {
      include /usr/local/nginx/conf/503include-only.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args; 
    
      # Wordpress fastcgi_cache
       try_files $uri $uri/ /index.php?$args;
    
      # Wordpress Permalinks
       #try_files $uri $uri/ /index.php?q=$uri&$args;
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    }
    

    then switch php-fpm fastcgi_cache include file back to regular php.conf one
    Code (Text):
     #include /usr/local/nginx/conf/wpincludes/domain.com/php-fastcgicache.conf;
     include /usr/local/nginx/conf/wpincludes/domain.com/php.conf;
    

    rest you can try figuring out from there
     
  3. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +256
    Local Time:
    5:26 AM
    1.17.x
    10.3.x
    File does not exist...

    cp /usr/local/nging/conf/php.conf /usr/local/nginx/conf/wpincludes/domain.com/php.conf

    oke, works!

    Test before and after on https://www.webpagetest.org/
    1)
    Project_CMM_7282.png 2)
    Project_CMM_7283.png
    3) Other domain with more content without any changes:
    Project_CMM_7284.png
    4) After changes
    Project_CMM_7286.png

    So reverting to old situation. Seems a little faster.

    Up to the wp-rocket issue...:)
     
    Last edited: Aug 11, 2019
  4. eva2000

    eva2000 Administrator Staff Member

    41,646
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    6:26 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    doh typo should be
    Code (Text):
     #include /usr/local/nginx/conf/wpincludes/domain.com/php-fastcgicache.conf;
     include /usr/local/nginx/conf/php.conf;
    
     
    • Like Like x 1
  5. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +256
    Local Time:
    5:26 AM
    1.17.x
    10.3.x
    :)Same effect. No Problem. Noticed it afterwards also, just woke up real early for a sunday...
    Even forgot to clean cache..... So result is nice...

    Project_CMM_7287.png
     
    Last edited: Aug 11, 2019
  6. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +256
    Local Time:
    5:26 AM
    1.17.x
    10.3.x
    @eva2000 After thinking a bit, I created a file /usr/local/nginx/conf/wpincludes/domain.com/poweredcache_include_domain.com.conf .... ??? Where do I include it ?

    Current domain.ssl.conf --> Can you please post a correct one?

    Code (Text):
    #x# HTTPS-DEFAULT
     server {
       
       server_name domain.com www.domain.com;
       return 302 https://domain.com$request_uri;
       include /usr/local/nginx/conf/staticfiles.conf;
     }
    
    server {
      listen 443 ssl http2;
      server_name domain.com www.domain.com;
    
      include /usr/local/nginx/conf/ssl/domain.com/domain.com.crt.key.conf;
      include /usr/local/nginx/conf/ssl_include.conf;
    
      # cloudflare authenticated origin pull cert community.centminmod.com/threads/13847/
      #ssl_client_certificate /usr/local/nginx/conf/ssl/cloudflare/domain.com/origin.crt;
      #ssl_verify_client on;
      http2_max_field_size 16k;
      http2_max_header_size 32k;
      # mozilla recommended
      ssl_ciphers TLS13-AES-128-GCM-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
    
      # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
      #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header X-Frame-Options SAMEORIGIN;
      add_header X-Xss-Protection "1; mode=block" always;
      add_header X-Content-Type-Options "nosniff" always;
      #add_header Referrer-Policy "strict-origin-when-cross-origin";
      #spdy_headers_comp 5;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
     
      # enable ocsp stapling
      resolver 8.8.8.8 8.8.4.4 1.1.1.1 1.0.0.1 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/domain.com/log/access.log combined buffer=256k flush=5m;
      error_log /home/nginx/domains/domain.com/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/domain.com/autoprotect-domain.com.conf;
      root /home/nginx/domains/domain.com/public;
      # 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/503include-main.conf;
    
      include /usr/local/nginx/conf/wpincludes/domain.com/wpfastcgicache_include_domain.com.conf;
      #include /usr/local/nginx/conf/wpincludes/domain.com/wpcacheenabler_domain.com.conf;
      #include /usr/local/nginx/conf/wpincludes/domain.com/wpsupercache_domain.com.conf;
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/wpincludes/domain.com/rediscache_domain.com.conf;  
      # Bad Bot Blocker
      include /usr/local/nginx/conf/ultimate-badbot-blocker/bots.d/ddos.conf;
      include /usr/local/nginx/conf/ultimate-badbot-blocker/bots.d/blockbots.conf;
    
     
      location / {   
      include /usr/local/nginx/conf/503include-only.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args;  
    
      # Wordpress fastcgi_cache
        try_files $uri $uri/ /index.php?$args;
    
      # Wordpress Permalinks
       #try_files $uri $uri/ /index.php?q=$uri&$args;
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    }
    
    location ~* /(wp-login\.php) {
        limit_req zone=xwplogin burst=1 nodelay;
        #limit_conn xwpconlimit 30;
        auth_basic "Private";
        auth_basic_user_file /home/nginx/domains/domain.com/htpasswd_wplogin;   
        #include /usr/local/nginx/conf/wpincludes/domain.com/php-fastcgicache.conf;
        include /usr/local/nginx/conf/php.conf;
    
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwprpc burst=45 nodelay;
        #limit_conn xwpconlimit 30;
        #include /usr/local/nginx/conf/wpincludes/domain.com/php-fastcgicache.conf;
        include /usr/local/nginx/conf/php.conf;
    
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-scripts\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        #include /usr/local/nginx/conf/wpincludes/domain.com/php-fastcgicache.conf;
        include /usr/local/nginx/conf/php.conf;
    
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-styles\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        #include /usr/local/nginx/conf/wpincludes/domain.com/php-fastcgicache.conf;
        include /usr/local/nginx/conf/php.conf;
    
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
      include /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com.conf;
      #include /usr/local/nginx/conf/wpincludes/domain.com/php-fastcgicache.conf;
      include /usr/local/nginx/conf/php.conf;
    
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/php-rediscache.conf;
      include /usr/local/nginx/conf/pre-staticfiles-local-domain.com.conf;
      include /usr/local/nginx/conf/pre-staticfiles-global.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    
     
  7. eva2000

    eva2000 Administrator Staff Member

    41,646
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    6:26 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    where you will comment out /usr/local/nginx/conf/wpincludes/domain.com/wpfastcgicache_include_domain.com.conf
    Code (Text):
      #include /usr/local/nginx/conf/wpincludes/domain.com/wpfastcgicache_include_domain.com.conf;
      /usr/local/nginx/conf/wpincludes/domain.com/poweredcache_include_domain.com.conf;
    
     
  8. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +256
    Local Time:
    5:26 AM
    1.17.x
    10.3.x
    Going to forget this one. Only gives errors. Made some nice progress with wp-rocket on other domains on the same install option.
    Code (Text):
    nginx -t
    nginx: [emerg] invalid number of arguments in "include" directive in /usr/local/nginx/conf/conf.d/domain.com.ssl.conf:68
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    

    Line #68
    Code (Text):
    include /usr/local/nginx/conf/ultimate-badbot-blocker/bots.d/ddos.conf;
     
    • Informative Informative x 1