Want more timely Centmin Mod News Updates?
Become a Member

Beta Branch update centmin.sh menu option 22 wpsecure include file template in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Sep 10, 2020.

  1. eva2000

    eva2000 Administrator Staff Member

    45,454
    10,314
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,998
    Local Time:
    6:36 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    update centmin.sh menu option 22 wpsecure include file template in 123.09beta01

    - Add additional whitelisted wordpress plugins to the default /usr/local/nginx/conf/wpincludes/${vhostname}/wpsecure_${vhostname}.conf include file template generated where $(vhostname) is yourdomain.com for your wordpress site created via centmin.sh menu option 22. This will apply to newly created centmin.sh menu option 22 wordpress sites.
    - Add tools/wp-cache-enabler-generate.sh tool made for cache enabler cache plugin - can be used to generate the latest templates for centmin.sh menu option 22 Cache Enabler configured wordpres site's cache enabler map file = /usr/local/nginx/conf/wpcacheenabler_map.conf, cache enabler include file = /usr/local/nginx/conf/wpincludes/${vhostname}/wpcacheenabler_${vhostname}.conf, nginx vhost's try_files syntax and also wpsecure include file mentioned below. It will generate the updated templates as a separate file and provide a diff universal compare of your live version versus generated one and let you manually decide what changes to merge yourself. This is best compromise as opposed to me automatically overwriting any customisations users may have added to their configuration files.
    - Existing wordpress sites created via centmin.sh menu option 22 now have a newly added tools/wp-cache-enabler-generate.sh tool made for cache enabler cache plugin. But has an wpsecure generator option applicable to generated a new /usr/local/nginx/conf/wpincludes/${vhostname}/wpsecure_${vhostname}.conf with suffix in name = -generated-XXXXXX timestamped include file which you can use to compare with your existing one and then you can manually decide what to merge and keep yourself in the live /usr/local/nginx/conf/wpincludes/${vhostname}/wpsecure_${vhostname}.conf include file.
    - Existing users can on 123.09beta01 or newer can run cmupdate command to update locate Centmin Mod code and then run tools/wp-cache-enabler-generate.sh tool's wpsecure option to generate the newer wpsecure include file and it will also do a universal diff compare highlighting the differences between your existing wpsecure include file and your newly generated one with suffix in name.

    To run tools/wp-cache-enabler-generate.sh tool's wpsecure option in SSH session type:

    Code (Text):
    cd /usr/local/src/centminmod/tools
    ./wp-cache-enabler-generate.sh wpsecure yourdomain.com


    Continue reading...

    123.09beta01 branch

     
  2. eva2000

    eva2000 Administrator Staff Member

    45,454
    10,314
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,998
    Local Time:
    6:36 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Example of using new for wordpress site called msdomain.com
    run cmupdate to update to latest code
    Code (Text):
    cmupdate
    No local changes to save
    remote: Enumerating objects: 14, done.
    remote: Counting objects: 100% (14/14), done.
    remote: Compressing objects: 100% (2/2), done.
    remote: Total 8 (delta 6), reused 8 (delta 6), pack-reused 0
    Unpacking objects: 100% (8/8), done.
    From https://github.com/centminmod/centminmod
       c08cba2..67f4bb0  123.09beta01 -> origin/123.09beta01
    Updating 19b44b9..67f4bb0
    Fast-forward
     addons/acmetool.sh                 |  185 +++++++++++++++++++++----------------
     centmin.sh                         |    2 +-
     inc/wpsetup-fastcgi-cache.inc      |  108 +++++++++++++++++++++-
     inc/wpsetup.inc                    |  108 +++++++++++++++++++++-
     tools/wp-cache-enabler-generate.sh | 1039 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     5 files changed, 1362 insertions(+), 80 deletions(-)
     create mode 100755 tools/wp-cache-enabler-generate.sh
    

    Code (Text):
    cd /usr/local/src/centminmod/tools
    ./wp-cache-enabler-generate.sh wpsecure msdomain.com
    

    example output for Wordpress site created via centmin.sh menu option 22 Wordpress installer for comparing live existing /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf vs newly generated wpsecure /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638 include files.
    Code (Text):
    ./wp-cache-enabler-generate.sh wpsecure msdomain.com
    ==========================================================================
    Generate Wordpress wpsecure include file:
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638
    ==========================================================================
    generating updated Wordpress wpsecure include file at:
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638
    generated: /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638
    differences between existing and newly generated wpsecure_msdomain.com.conf file
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    versus
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638
    --- /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf    2020-09-04 21:38:22.484574312 +0000
    +++ /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638    2020-09-10 05:06:39.063791752 +0000
    @@ -38,6 +38,105 @@
       }
     }
    +# Whitelist Exception for seo-by-rank-math
    +location ~ ^/wp-content/plugins/seo-by-rank-math/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for amp
    +location ~ ^/wp-content/plugins/amp/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for async-javascript
    +location ~ ^/wp-content/plugins/async-javascript/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for autoptimize
    +location ~ ^/wp-content/plugins/autoptimize/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for autoptimize-gzip
    +location ~ ^/wp-content/plugins/autoptimize-gzip/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for wp-cloudflare-page-cache
    +location ~ ^/wp-content/plugins/wp-cloudflare-page-cache/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for cloudflare
    +location ~ ^/wp-content/plugins/cloudflare/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for post-grid
    +location ~ ^/wp-content/plugins/post-grid/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for breadcrumb-navxt
    +location ~ ^/wp-content/plugins/breadcrumb-navxt/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    +  #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    +}
    +
     location ~ ^/(wp-includes/js/tinymce/wp-tinymce.php) {
       include /usr/local/nginx/conf/php.conf;
       include /usr/local/nginx/conf/staticfiles.conf;
    saved log: /root/centminlogs/wp-cache-enabler-generate-wpsecure-100920-050638.log
    

    add end of output there's a saved log path which you can use to revisit/reference back the output of the command
    Code (Text):
    saved log: /root/centminlogs/wp-cache-enabler-generate-wpsecure-100920-050638.log

    The output lists a diff universal compare of live existing wpsecure vs generated new wpsecure include file. The lines with single + in front are new additions and lines with single - minus in front are lines removed in newly generated wpsecure include file.
    Example if you had 2 files named 1 and 2 and their contents had 1 and 2 respectively a universal diff of them will show
    Code (Text):
    diff -u 1 2
    --- 1   2020-09-10 05:09:20.893519885 +0000
    +++ 2   2020-09-10 05:09:24.421579358 +0000
    @@ -1 +1 @@
    -1
    +2
    

    where file named 2's contents changed the line from 1 to 2
    In the above output example the following changes where added to newly generated wpsecure file at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638
    Code (Text):
    # Whitelist Exception for seo-by-rank-math
    location ~ ^/wp-content/plugins/seo-by-rank-math/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for amp
    location ~ ^/wp-content/plugins/amp/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for async-javascript
    location ~ ^/wp-content/plugins/async-javascript/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for autoptimize
    location ~ ^/wp-content/plugins/autoptimize/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for autoptimize-gzip
    location ~ ^/wp-content/plugins/autoptimize-gzip/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for wp-cloudflare-page-cache
    location ~ ^/wp-content/plugins/wp-cloudflare-page-cache/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for cloudflare
    location ~ ^/wp-content/plugins/cloudflare/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for post-grid
    location ~ ^/wp-content/plugins/post-grid/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    # Whitelist Exception for breadcrumb-navxt
    location ~ ^/wp-content/plugins/breadcrumb-navxt/ {
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      # below include file needs to be manually created at that path and to be uncommented
      # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
      # allows you to add commonly shared settings to all wp plugin location matches which
      # whitelist php processing access at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
      #include /usr/local/nginx/conf/wpincludes/msdomain.com/wpwhitelist_common.conf;
    }
    

    Or you can compare /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf and /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638 files with other local or online diff comparison tools too. Like example of this generated diff on diffchecker.com at Diff Checker
    Or if you haven't made any customisations to your existing wpsecure include file, just replace /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf with the newly generated one at /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-050638.
     
    Last edited: Sep 10, 2020
  3. eva2000

    eva2000 Administrator Staff Member

    45,454
    10,314
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,998
    Local Time:
    6:36 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    a 2nd update to wpsecure was made at Beta Branch - update centmin.sh menu option 22 wpsecure include file template in 123.09beta01 using the new wpsecure generator you can find the changes
    Code (Text):
    cmupdate
    cd /usr/local/src/centminmod/tools
    ./wp-cache-enabler-generate.sh wpsecure msdomain.com
    

    example output
    Code (Text):
    ./wp-cache-enabler-generate.sh wpsecure msdomain.com
    
    
    ==========================================================================
    Generate Wordpress wpsecure include file:
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-084318
    ==========================================================================
    generating updated Wordpress wpsecure include file at:
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-084318
    generated: /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-084318
    
    differences between existing and newly generated wpsecure_msdomain.com.conf file
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf
    versus
    /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-084318
    --- /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf    2020-09-04 21:38:22.484574312 +0000
    +++ /usr/local/nginx/conf/wpincludes/msdomain.com/wpsecure_msdomain.com.conf-generated-100920-084318    2020-09-10 08:43:19.556050510 +0000
    @@ -12,6 +12,12 @@
         }
     }
     
    +location ~* /wp-content/cache/autoptimize/.*\.(js|css)$ {
    +  include /usr/local/nginx/conf/php.conf;
    +  add_header AO-Fallback 1;
    +  try_files $uri $uri/ /wp-content/autoptimize_404_handler.php;
    +}
    +
     # allow AJAX requests in themes and plugins
     location ~ ^/wp-admin/admin-ajax.php$ { allow all; include /usr/local/nginx/conf/php.conf; }
     
    @@ -38,6 +44,111 @@
       }
     }
     
    +# Whitelist Exception for seo-by-rank-math
    +location ~ ^/wp-content/plugins/seo-by-rank-math/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for amp
    +location ~ ^/wp-content/plugins/amp/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for async-javascript
    +location ~ ^/wp-content/plugins/async-javascript/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for autoptimize
    +location ~ ^/wp-content/plugins/autoptimize/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for autoptimize-gzip
    +location ~ ^/wp-content/plugins/autoptimize-gzip/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Security for wp-cloudflare-page-cache debug.log which is exposed to public access
    +# /wp-content/wp-cloudflare-super-page-cache/yourdomain.com/debug.log
    +location ~ ^/wp-content/wp-cloudflare-super-page-cache/msdomain.com/(debug.log)$ {
    +  deny all;
    +}
    +
    +# Whitelist Exception for wp-cloudflare-page-cache
    +location ~ ^/wp-content/plugins/wp-cloudflare-page-cache/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for cloudflare
    +location ~ ^/wp-content/plugins/cloudflare/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for post-grid
    +location ~ ^/wp-content/plugins/post-grid/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
    +# Whitelist Exception for breadcrumb-navxt
    +location ~ ^/wp-content/plugins/breadcrumb-navxt/ {
    +  include /usr/local/nginx/conf/php.conf;
    +  include /usr/local/nginx/conf/staticfiles.conf;
    +  # below include file needs to be manually created at that path and to be uncommented
    +  # by removing the hash # in front of below line to take effect. This wpwhitelist_common.conf
    +  # allows you to add commonly shared settings to all wp plugin location matches which
    +  # whitelist php processing access at /usr/local/nginx/conf/wpincludes/servermanager.guide/wpsecure_servermanager.guide.conf
    +  #include /usr/local/nginx/conf/wpincludes/servermanager.guide/wpwhitelist_common.conf;
    +}
    +
     location ~ ^/(wp-includes/js/tinymce/wp-tinymce.php) {
       include /usr/local/nginx/conf/php.conf;
       include /usr/local/nginx/conf/staticfiles.conf;
    
    
    saved log: /root/centminlogs/wp-cache-enabler-generate-wpsecure-100920-084318.log
     
  4. David Schargel

    David Schargel New Member

    14
    5
    3
    Feb 2, 2020
    Ratings:
    +12
    Local Time:
    1:36 AM
    This is great stuff! Can you please have the new wpsecure generator also work on domains that do not have the Cache Enabler plugin activated? I have a number of staging and developments domains within Centmin Mod where the Cache Enabler plugin is installed though I don't activate it until final testing and a move to production deployment. I'd love to have the whitelist exceptions in there for testing.

    With the new wpsecure generator, I am getting a message of:
    Code:
    Cache Enabler plugin not detected in Wordpress installation
    at /home/nginx/domains/mystaging.mydomain.com/public
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    45,454
    10,314
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,998
    Local Time:
    6:36 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Ah haven't thought of such scenarios so will see what I can come up with for Cache Enabler being installed but not yet activated.
     
  6. David Schargel

    David Schargel New Member

    14
    5
    3
    Feb 2, 2020
    Ratings:
    +12
    Local Time:
    1:36 AM
    Excellent; thanks for considering it. There's a general wisdom in disabling as many caches as possible when doing development (until go-live is imminent). That means that I'm apt to disable Autoptimise, Cache Enabler, CDN Enabler, etc. There's only so many Purge/Clear Cache buttons one can repeatedly press! :p