Learn about Centmin Mod LEMP Stack today
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

    40,644
    9,028
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,900
    Local Time:
    7:51 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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

    40,644
    9,028
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,900
    Local Time:
    7:51 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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

    170
    52
    28
    Nov 8, 2015
    Ratings:
    +97
    Local Time:
    7:51 AM
    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.
     
    style="display:inline-block;min-width:400px;max-width:970px;width:95%;height:90px" data-ad-client="ca-pub-6669518204467592" data-ad-slot="4024536743" data-ad-format="auto">
  4. eva2000

    eva2000 Administrator Staff Member

    40,644
    9,028
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,900
    Local Time:
    7:51 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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
     
    • Like Like x 1