Welcome to Centmin Mod Community
Register Now

Beta Branch add VHOSTCTRL_CLOUDFLAREINC & VHOSTCTRL_AUTOPROTECTINC variables

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 25, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    54,535
    12,219
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,788
    Local Time:
    9:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    add VHOSTCTRL_CLOUDFLAREINC & VHOSTCTRL_AUTOPROTECTINC variables

    Add vhost control variables for VHOSTCTRL_CLOUDFLAREINC & VHOSTCTRL_AUTOPROTECTINC which respectively control whether at vhost creation time, the cloudflare.conf include file and autoprotect-vhostname.conf include files are uncommented (enabled) or commented out (disabled) by default. Variables default to VHOSTCTRL_CLOUDFLAREINC='n' & VHOSTCTRL_AUTOPROTECTINC='y' and be overridden via persistent config file /etc/centminmod/custom_config.inc in which you would set VHOSTCTRL_CLOUDFLAREINC='y' & VHOSTCTRL_AUTOPROTECTINC='n' if you wanted to enable cloudflare.conf include file and disable autoprotect include.

    Continue reading...

    123.09beta01 branch


     
  2. eva2000

    eva2000 Administrator Staff Member

    54,535
    12,219
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,788
    Local Time:
    9:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Cloudflare using folks might want to use this newly added variable VHOSTCTRL_CLOUDFLAREINC to enable csfcf.sh cloudflare.conf include in newly created Nginx vhost config files as outlined at csfcf.sh - automate Cloudflare Nginx & CSF Firewall setups. In persistent config file /etc/centminmod/custom_config.in set
    Code (Text):
    VHOSTCTRL_CLOUDFLAREINC='y'
    

    Once set, just create nginx vhost normally via centmin.sh menu option 2, 22 or nv command.

    You would of needed to update Centmin Mod 123.09beta01 code first via SSH command
    Code (Text):
    cmupdate
    

    example output from cmupdate command
    Code (Text):
    cmupdate
    No local changes to save
    remote: Counting objects: 11, done.
    remote: Compressing objects: 100% (1/1), done.
    remote: Total 11 (delta 9), reused 11 (delta 9), pack-reused 0
    Unpacking objects: 100% (11/11), done.
    From https://github.com/centminmod/centminmod
       7a21ca8..e1017a9  123.09beta01 -> origin/123.09beta01
    Updating 7a21ca8..e1017a9
    Fast-forward
     centmin.sh                |  9 +++++++--
     example/custom_config.inc |  7 +++++++
     inc/nginx_addvhost.inc    | 22 ++++++++++++++++++++++
     inc/wpsetup.inc           | 22 ++++++++++++++++++++++
     tools/nv.sh               | 22 ++++++++++++++++++++++
     tools/nvwp.sh             | 22 ++++++++++++++++++++++
     6 files changed, 102 insertions(+), 2 deletions(-)
    

    or via centmin.sh menu option 23 submenu option 2 then exit centmin.sh
     
  3. MaximilianKohler

    MaximilianKohler Member

    200
    6
    18
    Jun 23, 2023
    Ratings:
    +33
    Local Time:
    3:36 AM
  4. eva2000

    eva2000 Administrator Staff Member

    54,535
    12,219
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,788
    Local Time:
    9:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    It should apply to all newly created Nginx vhosts created via centmin.sh menu option 22, 2 or nv command line.