Want more timely Centmin Mod News Updates?
Become a Member

Beta Branch add tools/regen_wpsecure.sh to 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Sep 12, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    2:13 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    add tools/regen_wpsecure.sh to 123.09beta01

    tools/regen_wpsecure.sh is a companion script for centmin.sh menu option 22 to regenerate the latest version of wordpress include file at /usr/local/nginx/conf/wpincludes/${vhostname}/wpsecure_${vhostname}.conf where ${vhostname} is yourdomain.com name. As wpsecure include file undergoes development, new settings are added which outdate existing centmin.sh menu option 22 installed wordpress site's already generated include file at /usr/local/nginx/conf/wpincludes/${vhostname}/wpsecure_${vhostname}.conf. This tools/regen_wpsecure.sh script regenerates an more update to date version and backups up existing file to time stamped date.


    Command Usage

    Code (Text):
    ./regen_wpsecure.sh
     Command Usage:
    
     if wordpress installed at web root i.e. domain.com/ type:
    
       ./regen_wpsecure.sh -d domain.com -s no
    
     if wordpress installed in subdirectory i.e. domain.com/blog type:
    
       ./regen_wpsecure.sh -d domain.com -s blog
    


    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    2:13 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    example run

    Code (Text):
    tools/regen_wpsecure.sh -d domain.com -s no
    /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com.conf exists already
    backing up and overwriting
    
    backed up at /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com-110916-173234.conf
    
    re-generating /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com.conf
    
    re-generated /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com.conf
    
     
  3. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    2:13 PM
    I would like to see the settings and changes to wpsecure documented somewhere so we can track what security is being implemented with it as it evolves.
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    2:13 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    as everyone's own wpsecure would differ i.e. customisations etc, probably easiest way is to do a diff compare of end user's specific backed up and regenerated files

    i.e. from above example both are one whole single line commands
    Code (Text):
    diff -u
    /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com-110916-173234.conf
    /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com.conf
    

    Code (Text):
    sdiff -s
    /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com-110916-173234.conf
    /usr/local/nginx/conf/wpincludes/domain.com/wpsecure_domain.com.conf
    

    i.e.
    Code (Text):
    sdiff -s oldfile newfile