From 87e46d91456ebd898a4c2bce8b4423f6d44ff06a Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Sat, 18 Jan 2020 18:43:58 +0100 Subject: [PATCH 01/27] Fix site ssl status not updated --- wo/cli/plugins/site_update.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wo/cli/plugins/site_update.py b/wo/cli/plugins/site_update.py index 25b918f..6b6b700 100644 --- a/wo/cli/plugins/site_update.py +++ b/wo/cli/plugins/site_update.py @@ -614,8 +614,9 @@ class WOSiteUpdateController(CementBaseController): 'www.{0}'.format(wo_domain)] if WOAcme.cert_check(self, wo_domain): - SSL.archivedcertificatehandle( - self, wo_domain, acme_domains) + if SSL.archivedcertificatehandle( + self, wo_domain, acme_domains): + letsencrypt = True else: if acme_subdomain: Log.debug(self, "checkWildcardExist on *.{0}" @@ -676,6 +677,7 @@ class WOSiteUpdateController(CementBaseController): "check issues with `nginx -t` command") Log.info(self, "Congratulations! Successfully " "Configured SSL on https://{0}".format(wo_domain)) + letsencrypt = True if (SSL.getexpirationdays(self, wo_domain) > 0): Log.info(self, "Your cert will expire within " + str(SSL.getexpirationdays(self, wo_domain)) + @@ -725,8 +727,9 @@ class WOSiteUpdateController(CementBaseController): # auto-renewal") WOCron.remove_cron(self,'wo site # update {0} --le=renew --min_expiry_limit 30 # 2> \/dev\/null'.format(wo_domain)) - Log.info(self, "Successfully Disabled SSl for Site " - " http://{0}".format(wo_domain)) + Log.info(self, "Successfully Disabled SSl for Site " + " http://{0}".format(wo_domain)) + letsencrypt = False # Add nginx conf folder into GIT WOGit.add(self, ["{0}/conf/nginx".format(wo_site_webroot)], From a40a96c3e3b39d85a40af46f92882f2785cab2a5 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 21 Jan 2020 12:44:07 +0100 Subject: [PATCH 02/27] Fix MySQL purge with remote MySQL server --- CHANGELOG.md | 4 ++++ wo/cli/plugins/stack.py | 17 +++++++---------- wo/core/mysql.py | 5 ++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cccebb..c04ade7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] +#### Fixed + +- MySQL databases backup when using remote MySQL server + ### v3.11.4 - 2020-01-17 #### Fixed diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 51db16b..b54605d 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -1123,20 +1123,17 @@ class WOStackController(CementBaseController): if start_purge != "Y" and start_purge != "y": Log.error(self, "Not starting stack purge") - if (set(["nginx-custom"]).issubset(set(apt_packages))): + if "nginx-custom" in apt_packages: WOService.stop_service(self, 'nginx') - if (set(["fail2ban"]).issubset(set(apt_packages))): + if "fail2ban" in apt_packages: WOService.stop_service(self, 'fail2ban') - if (set(["mariadb-server"]).issubset(set(apt_packages))): - if self.app.config.has_section('stack'): - database_host = self.app.config.get( - 'stack', 'ip-address') - else: - database_host = 'na' - if database_host == '127.0.0.1': - WOMysql.backupAll(self) + if "mariadb-server" in apt_packages: + if self.app.config.has_section('mysql'): + if self.app.config.get( + 'mysql', 'grant-host') == 'localhost': + WOMysql.backupAll(self) WOService.stop_service(self, 'mysql') # Netdata uninstaller diff --git a/wo/core/mysql.py b/wo/core/mysql.py index 275a56a..ed3e49c 100644 --- a/wo/core/mysql.py +++ b/wo/core/mysql.py @@ -31,9 +31,8 @@ class WOMysql(): # Makes connection with MySQL server try: if os.path.exists('/etc/mysql/conf.d/my.cnf'): - connection = \ - pymysql.connect(read_default_file='/etc/mysql/' - 'conf.d/my.cnf') + connection = pymysql.connect( + read_default_file='/etc/mysql/conf.d/my.cnf') else: connection = pymysql.connect(read_default_file='~/.my.cnf') return connection From 47dbb65ed8ae6a6434ea2a9fa0b5a19561dd08a0 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 24 Jan 2020 09:37:47 +0100 Subject: [PATCH 03/27] Set opcache.preload_user for PHP 7.4 --- CHANGELOG.md | 6 +++++- wo/cli/plugins/stack_pref.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c04ade7..0a6698c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] +#### Added + +- Set opcache.preload_user for PHP 7.4 + #### Fixed -- MySQL databases backup when using remote MySQL server +- MySQL databases backup when using remote MySQL serverlll ### v3.11.4 - 2020-01-17 diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 9b10bb0..6ad0bcd 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -805,6 +805,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): config['opcache']['opcache.revalidate_freq'] = '5' config['opcache']['opcache.consistency_checks'] = '0' config['opcache']['opcache.validate_timestamps'] = '1' + config['opcache']['opcache.preload_user'] = 'www-data' with open('/etc/php/7.4/fpm/php.ini', encoding='utf-8', mode='w') as configfile: Log.debug(self, "Writting php configuration into " From 65b950e5ac0c05cca134dbd29defc004a1252fd5 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 28 Jan 2020 12:47:00 +0100 Subject: [PATCH 04/27] Add php version selection into wo.conf * set PHP 7.3 as default php version * update travis script --- config/wo.conf | 5 +++ tests/travis.sh | 58 +++++++++++++++++++---------------- wo/cli/plugins/site_create.py | 34 ++++++++++++++------ wo/cli/plugins/site_update.py | 4 +-- wo/cli/plugins/stack.py | 3 +- 5 files changed, 63 insertions(+), 41 deletions(-) diff --git a/config/wo.conf b/config/wo.conf index 5fcf7f6..bad2f5a 100644 --- a/config/wo.conf +++ b/config/wo.conf @@ -88,3 +88,8 @@ enable_plugin = true ### `wo.cli.plugins.example` or from the file path ### `/var/lib/wo/plugins/example.py` enable_plugin = true + +[php] + +### Default PHP version +version = 7.3 diff --git a/tests/travis.sh b/tests/travis.sh index 62b1514..6d0d4fc 100644 --- a/tests/travis.sh +++ b/tests/travis.sh @@ -49,7 +49,7 @@ done echo -e "${CGREEN}#############################################${CEND}" echo -e ' Simple site create ' echo -e "${CGREEN}#############################################${CEND}" -site_types='html php php73 php74 mysql wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' +site_types='html php php72 php73 php74 mysql wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' for site in $site_types; do echo -ne " Creating $site [..]\r" if { @@ -67,36 +67,17 @@ done echo echo -e "${CGREEN}#############################################${CEND}" echo -wo site info wp.net +wo site info php.net +echo +echo +wo site info php72.net +echo echo -echo -e "${CGREEN}#############################################${CEND}" -echo -e ' wo site update --php73 ' -echo -e "${CGREEN}#############################################${CEND}" -other_site_types='html mysql php php74 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' -for site in $other_site_types; do - echo -ne " Updating site to $site php73 [..]\r" - if { - wo site update ${site}.net --php73 - } >>/var/log/wo/test.log; then - echo -ne " Updating site to $site php73 [${CGREEN}OK${CEND}]\\r" - echo -ne '\n' - else - echo -e " Updating site to $site php73 [${CRED}FAIL${CEND}]" - echo -ne '\n' - exit_script - - fi -done -echo -echo -e "${CGREEN}#############################################${CEND}" -echo -wo site info wp.net -echo echo -e "${CGREEN}#############################################${CEND}" echo -e ' wo site update --php74 ' echo -e "${CGREEN}#############################################${CEND}" -other_site_types='html mysql wp php php73 wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' +other_site_types='html mysql php72 php74 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' for site in $other_site_types; do echo -ne " Updating site to $site php74 [..]\r" if { @@ -117,9 +98,32 @@ echo wo site info wp.net echo echo -e "${CGREEN}#############################################${CEND}" +echo -e ' wo site update --php73 ' +echo -e "${CGREEN}#############################################${CEND}" +other_site_types='html mysql wp php72 php73 wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' +for site in $other_site_types; do + echo -ne " Updating site to $site php73 [..]\r" + if { + wo site update ${site}.net --php73 + } >>/var/log/wo/test.log; then + echo -ne " Updating site to $site php73 [${CGREEN}OK${CEND}]\\r" + echo -ne '\n' + else + echo -e " Updating site to $site php73 [${CRED}FAIL${CEND}]" + echo -ne '\n' + exit_script + + fi +done +echo +echo -e "${CGREEN}#############################################${CEND}" +echo +wo site info wp.net +echo +echo -e "${CGREEN}#############################################${CEND}" echo -e ' wo site update --php72 ' echo -e "${CGREEN}#############################################${CEND}" -other_site_types='html mysql php php73 php74 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' +other_site_types='html mysql php72 php73 php74 wp wpfc wpsc wpredis wpce wprocket wpsubdomain wpsubdir ngxblocker' for site in $other_site_types; do echo -ne " Updating site to $site php72 [..]\r" if { diff --git a/wo/cli/plugins/site_create.py b/wo/cli/plugins/site_create.py index 71bff0f..aa8d5b3 100644 --- a/wo/cli/plugins/site_create.py +++ b/wo/cli/plugins/site_create.py @@ -211,21 +211,35 @@ class WOSiteCreateController(CementBaseController): else: pass + data['php73'] = False + data['php74'] = False + data['php72'] = False + if data and pargs.php73: data['php73'] = True - data['php74'] = False - data['php72'] = False data['wo_php'] = 'php73' elif data and pargs.php74: - data['php72'] = False data['php74'] = True - data['php73'] = False data['wo_php'] = 'php74' - else: - data['php74'] = False + elif data and pargs.php72: data['php72'] = True - data['php73'] = False data['wo_php'] = 'php72' + else: + if self.app.config.has_section('php'): + config_php_ver = self.app.config.get( + 'php', 'version') + if config_php_ver == '7.2': + data['php72'] = True + data['wo_php'] = 'php72' + elif config_php_ver == '7.3': + data['php73'] = True + data['wo_php'] = 'php73' + elif config_php_ver == '7.4': + data['php74'] = True + data['wo_php'] = 'php74' + else: + data['php73'] = True + data['wo_php'] = 'php73' if ((not pargs.wpfc) and (not pargs.wpsc) and (not pargs.wprocket) and @@ -288,12 +302,12 @@ class WOSiteCreateController(CementBaseController): " http://{0}".format(wo_domain)) return - if data['php73']: - php_version = "7.3" + if data['php72']: + php_version = "7.2" elif data['php74']: php_version = "7.4" else: - php_version = "7.2" + php_version = "7.3" addNewSite(self, wo_domain, stype, cache, wo_site_webroot, php_version=php_version) diff --git a/wo/cli/plugins/site_update.py b/wo/cli/plugins/site_update.py index 6b6b700..d27c652 100644 --- a/wo/cli/plugins/site_update.py +++ b/wo/cli/plugins/site_update.py @@ -220,7 +220,6 @@ class WOSiteUpdateController(CementBaseController): Log.error( self, "service nginx reload failed. " "check issues with `nginx -t` command") - return 0 # setup ngxblocker if (pargs.ngxblocker): @@ -244,7 +243,6 @@ class WOSiteUpdateController(CementBaseController): if not WOService.reload_service(self, 'nginx'): Log.error(self, "service nginx reload failed. " "check issues with `nginx -t` command") - return 0 # letsencryot rebew if (pargs.letsencrypt == 'renew'): @@ -615,7 +613,7 @@ class WOSiteUpdateController(CementBaseController): if WOAcme.cert_check(self, wo_domain): if SSL.archivedcertificatehandle( - self, wo_domain, acme_domains): + self, wo_domain, acme_domains): letsencrypt = True else: if acme_subdomain: diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index b54605d..b60d670 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -158,6 +158,7 @@ class WOStackController(CementBaseController): pargs.phpredisadmin = True pargs.extplorer = True pargs.cheat = True + pargs.nanorc = True if pargs.security: pargs.fail2ban = True @@ -178,7 +179,7 @@ class WOStackController(CementBaseController): apt_packages = apt_packages + WOVar.wo_redis else: - Log.info(self, "Redis already installed") + Log.debug(self, "Redis already installed") # PHP 7.2 if pargs.php72: From dce09ddadbead6dfbb7ab80726eb78e4dc11c345 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 28 Jan 2020 13:31:18 +0100 Subject: [PATCH 05/27] update php stack check during site creating * use the php version define in wo.conf * define php7.3 as default --- wo/cli/plugins/site_functions.py | 46 ++++++++++++++++++++++---------- wo/cli/plugins/site_update.py | 4 +-- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index dbf86f1..1bb1d32 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -871,26 +871,44 @@ def site_package_check(self, stype): wo_nginx.write('fastcgi_param \tSCRIPT_FILENAME ' '\t$request_filename;\n') - if pargs.php and pargs.php73: + if ((pargs.php and pargs.php73) or (pargs.php and pargs.php74) or + (pargs.php73 and pargs.php74) or (pargs.php72 and pargs.php73) or + (pargs.php72 and pargs.php74)): Log.error( self, "Error: two different PHP versions cannot be " "combined within the same WordOps site") - if pargs.php and pargs.php74: - Log.error( - self, "Error: two different PHP versions cannot be " - "combined within the same WordOps site") - - if pargs.php73 and pargs.php74: - Log.error( - self, "Error: two different PHP versions cannot be " - "combined within the same WordOps site") - - if ((not pargs.php73) and (not pargs.php74) and - stype in ['php', 'php72', 'mysql', 'wp', 'wpsubdir', + if ((not pargs.php72) and (not pargs.php73) and (not pargs.php74) and + stype in ['php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']): + Log.debug(self, "Setting apt_packages variable for PHP") + php_check = 'php7.3-fpm' + if self.app.config.has_section('php'): + config_php_ver = self.app.config.get( + 'php', 'version') + if config_php_ver == '7.2': + php_check = 'php7.2-fpm' + php_to_setup = WOVar.wo_php72 + elif config_php_ver == '7.3': + php_check = 'php7.3-fpm' + php_to_setup = WOVar.wo_php73 + elif config_php_ver == '7.4': + php_check = 'php7.4-fpm' + php_to_setup = WOVar.wo_php74 + else: + php_check = 'php7.3-fpm' + php_to_setup = WOVar.wo_php73 + else: + php_check = 'php7.3-fpm' + php_to_setup = WOVar.wo_php73 + + if not (WOAptGet.is_installed(self, php_check)): + apt_packages = apt_packages + php_to_setup + WOVar.wo_php_extra + + if pargs.php72 and stype in ['php72', 'mysql', 'wp', + 'wpsubdir', 'wpsubdomain']: Log.debug(self, "Setting apt_packages variable for PHP 7.2") - if not (WOAptGet.is_installed(self, 'php7.2-fpm')): + if not WOAptGet.is_installed(self, 'php7.2-fpm'): apt_packages = apt_packages + WOVar.wo_php72 + WOVar.wo_php_extra if pargs.php73 and stype in ['php73', 'mysql', 'wp', diff --git a/wo/cli/plugins/site_update.py b/wo/cli/plugins/site_update.py index d27c652..ecabd3d 100644 --- a/wo/cli/plugins/site_update.py +++ b/wo/cli/plugins/site_update.py @@ -531,8 +531,8 @@ class WOSiteUpdateController(CementBaseController): data['wo_php'] = 'php72' check_php_version = '7.2' else: - data['wo_php'] = 'php72' - check_php_version = '7.2' + data['wo_php'] = 'php73' + check_php_version = '7.3' if pargs.hsts: data['hsts'] = bool(pargs.hsts == "on") From 15f3d49eed15db16d39e7bacaaa0ef5f5c2efd9d Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 30 Jan 2020 12:35:38 +0100 Subject: [PATCH 06/27] Fix fail2ban configuration when nginx not installed * improve kernel tweaks * remove deprecated kernel tweaks --- wo/cli/plugins/stack_pref.py | 45 +++++++++++++++++--------------- wo/cli/templates/sysctl.mustache | 11 +++++++- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 6ad0bcd..4e7aeca 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -944,6 +944,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): config_file.write(config) config_file.close() else: + # make sure root account have all privileges if "PASSWORD" not in WOShellExec.cmd_exec_stdout( self, 'mysql -e "use mysql; show grants;"'): try: @@ -1017,25 +1018,27 @@ def post_pref(self, apt_packages, packages, upgrade=False): # create fail2ban configuration files if "fail2ban" in apt_packages: WOService.restart_service(self, 'fail2ban') - WOGit.add(self, ["/etc/fail2ban"], - msg="Adding Fail2ban into Git") - Log.info(self, "Configuring Fail2Ban") - data = dict(release=WOVar.wo_version) - WOTemplate.deploy( - self, - '/etc/fail2ban/jail.d/custom.conf', - 'fail2ban.mustache', - data, overwrite=False) - WOTemplate.deploy( - self, - '/etc/fail2ban/filter.d/wo-wordpress.conf', - 'fail2ban-wp.mustache', - data, overwrite=False) - WOTemplate.deploy( - self, - '/etc/fail2ban/filter.d/nginx-forbidden.conf', - 'fail2ban-forbidden.mustache', - data, overwrite=False) + if os.path.exists('/etc/fail2ban:'): + WOGit.add(self, ["/etc/fail2ban"], + msg="Adding Fail2ban into Git") + Log.info(self, "Configuring Fail2Ban") + data = dict(release=WOVar.wo_version) + WOTemplate.deploy( + self, + '/etc/fail2ban/jail.d/custom.conf', + 'fail2ban.mustache', + data, overwrite=False) + if WOAptGet.is_exec(self, 'nginx'): + WOTemplate.deploy( + self, + '/etc/fail2ban/filter.d/wo-wordpress.conf', + 'fail2ban-wp.mustache', + data, overwrite=False) + WOTemplate.deploy( + self, + '/etc/fail2ban/filter.d/nginx-forbidden.conf', + 'fail2ban-forbidden.mustache', + data, overwrite=False) if not WOService.reload_service(self, 'fail2ban'): WOGit.rollback( @@ -1092,8 +1095,8 @@ def post_pref(self, apt_packages, packages, upgrade=False): Log.debug(self, "{0}".format(e)) Log.error(self, "Unable to add UFW rules") - if ((os.path.isfile("/etc/fail2ban/jail.d/custom.conf")) and - (not WOFileUtils.grep( + if ((os.path.exists("/etc/fail2ban/jail.d/custom.conf")) and + (not WOFileUtils.grepcheck( self, "/etc/fail2ban/jail.d/custom.conf", "proftpd"))): with open("/etc/fail2ban/jail.d/custom.conf", diff --git a/wo/cli/templates/sysctl.mustache b/wo/cli/templates/sysctl.mustache index f4e9440..9caf30b 100644 --- a/wo/cli/templates/sysctl.mustache +++ b/wo/cli/templates/sysctl.mustache @@ -64,6 +64,13 @@ fs.suid_dumpable = 0 # Hide exposed kernel pointers kernel.kptr_restrict = 1 +# Restrict access to kernel logs +kernel.dmesg_restrict = 1 + +# Restrict ptrace scope +kernel.yama.ptrace_scope = 1 + + ### ### IMPROVE SYSTEM MEMORY MANAGEMENT ### ### @@ -96,6 +103,9 @@ vm.min_free_kbytes = 65535 ### GENERAL NETWORK SECURITY OPTIONS ### ### +# Harden BPF JIT compiler +net.core.bpf_jit_harden = 1 + #Prevent SYN attack, enable SYNcookies (they will kick-in when the max_syn_backlog reached) net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_syn_retries = 2 @@ -206,7 +216,6 @@ net.core.optmem_max = 65535 net.ipv4.tcp_max_tw_buckets = 1440000 # try to reuse time-wait connections, but don't recycle them (recycle can break clients behind NAT) -net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 1 # Limit number of orphans, each orphan can eat up to 16M (max wmem) of unswappable memory From 8e40bac3741ea90ea5069dc7d84781c11df20561 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 30 Jan 2020 15:26:17 +0100 Subject: [PATCH 07/27] fix fail2ban --- wo/cli/plugins/stack_pref.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 4e7aeca..77656c1 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1023,12 +1023,12 @@ def post_pref(self, apt_packages, packages, upgrade=False): msg="Adding Fail2ban into Git") Log.info(self, "Configuring Fail2Ban") data = dict(release=WOVar.wo_version) - WOTemplate.deploy( - self, - '/etc/fail2ban/jail.d/custom.conf', - 'fail2ban.mustache', - data, overwrite=False) if WOAptGet.is_exec(self, 'nginx'): + WOTemplate.deploy( + self, + '/etc/fail2ban/jail.d/custom.conf', + 'fail2ban.mustache', + data, overwrite=False) WOTemplate.deploy( self, '/etc/fail2ban/filter.d/wo-wordpress.conf', From 6421e045b0cd7e3f74010fcc39907cfc91b62ae2 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 30 Jan 2020 15:37:56 +0100 Subject: [PATCH 08/27] another fail2ban fix --- wo/cli/plugins/stack_pref.py | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 77656c1..c242ea6 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1023,22 +1023,21 @@ def post_pref(self, apt_packages, packages, upgrade=False): msg="Adding Fail2ban into Git") Log.info(self, "Configuring Fail2Ban") data = dict(release=WOVar.wo_version) - if WOAptGet.is_exec(self, 'nginx'): - WOTemplate.deploy( - self, - '/etc/fail2ban/jail.d/custom.conf', - 'fail2ban.mustache', - data, overwrite=False) - WOTemplate.deploy( - self, - '/etc/fail2ban/filter.d/wo-wordpress.conf', - 'fail2ban-wp.mustache', - data, overwrite=False) - WOTemplate.deploy( - self, - '/etc/fail2ban/filter.d/nginx-forbidden.conf', - 'fail2ban-forbidden.mustache', - data, overwrite=False) + WOTemplate.deploy( + self, + '/etc/fail2ban/jail.d/custom.conf', + 'fail2ban.mustache', + data, overwrite=False) + WOTemplate.deploy( + self, + '/etc/fail2ban/filter.d/wo-wordpress.conf', + 'fail2ban-wp.mustache', + data, overwrite=False) + WOTemplate.deploy( + self, + '/etc/fail2ban/filter.d/nginx-forbidden.conf', + 'fail2ban-forbidden.mustache', + data, overwrite=False) if not WOService.reload_service(self, 'fail2ban'): WOGit.rollback( From 21bba1d12a130048e20fc01d8f979d91e4dc3bd4 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 30 Jan 2020 17:07:42 +0100 Subject: [PATCH 09/27] Fix fail2ban typo --- wo/cli/plugins/stack_pref.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index c242ea6..b5bd97b 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1018,7 +1018,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): # create fail2ban configuration files if "fail2ban" in apt_packages: WOService.restart_service(self, 'fail2ban') - if os.path.exists('/etc/fail2ban:'): + if os.path.exists('/etc/fail2ban'): WOGit.add(self, ["/etc/fail2ban"], msg="Adding Fail2ban into Git") Log.info(self, "Configuring Fail2Ban") @@ -1039,12 +1039,13 @@ def post_pref(self, apt_packages, packages, upgrade=False): 'fail2ban-forbidden.mustache', data, overwrite=False) - if not WOService.reload_service(self, 'fail2ban'): - WOGit.rollback( - self, ['/etc/fail2ban'], msg="Rollback f2b config") - else: - WOGit.add(self, ["/etc/fail2ban"], - msg="Adding Fail2ban into Git") + if not WOService.reload_service(self, 'fail2ban'): + WOGit.rollback( + self, ['/etc/fail2ban'], msg="Rollback f2b config") + WOService.restart_service(self, 'fail2ban') + else: + WOGit.add(self, ["/etc/fail2ban"], + msg="Adding Fail2ban into Git") # Proftpd configuration if "proftpd-basic" in apt_packages: From 8047440acf533f9c980635d0f11b511877c614b1 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 4 Feb 2020 12:26:36 +0100 Subject: [PATCH 10/27] Add link to changelog after upgrade --- CHANGELOG.md | 1 + install | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a6698c..3c405ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), #### Added - Set opcache.preload_user for PHP 7.4 +- Link to GitHub changelog after WordOps upgrade #### Fixed diff --git a/install b/install index 3e6b609..5c296c1 100755 --- a/install +++ b/install @@ -761,6 +761,7 @@ else echo elif [ "$wo_upgrade" = "1" ]; then wo_lib_echo "WordOps (wo) upgrade to $wo_version_new was succesfull!" + wo_lib_echo "Changelog is available on https://github.com/WordOps/WordOps/releases/tag/$wo_version_new" echo wo_lib_echo "To upgrade WordOps web stacks, you can use the command:" wo_lib_echo_info "wo stack upgrade" From 930e92ac034349c9f9f1425c21f498cb76cc4cda Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 7 Feb 2020 15:03:42 +0100 Subject: [PATCH 11/27] Minor change in stack_pref --- wo/cli/plugins/stack_pref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index b5bd97b..c4c341b 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -400,7 +400,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): .format(ngxroot))): SSL.selfsignedcert(self, proftpd=False, backend=True) - if not os.path.isfile('{0}22222/conf/nginx/ssl.conf' + if not os.path.exists('{0}22222/conf/nginx/ssl.conf' .format(ngxroot)): with open("/var/www/22222/conf/nginx/" "ssl.conf", "w") as php_file: From b1e9262f920ccbdc784d02cd8a36eedf57287fc6 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 26 Feb 2020 10:01:27 +0100 Subject: [PATCH 12/27] Fix install on raspberry pi 4 --- install | 8 ++++---- wo/cli/plugins/stack_pref.py | 28 +++++++++++++++++++++------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/install b/install index 5c296c1..0656fe8 100755 --- a/install +++ b/install @@ -7,9 +7,9 @@ # Copyright (c) 2019-2020 - WordOps # This script is licensed under M.I.T # ------------------------------------------------------------------------- -# wget -qO wo wops.cc && sudo bash wo +# wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.11.4 - 2020-01-17 +# Version 3.11.5 - 2020-02-11 # ------------------------------------------------------------------------- # CONTENTS @@ -433,10 +433,10 @@ wo_install() { rm -f /usr/local/bin/wo if [ "$wo_branch" = "master" ]; then python3 -m pip uninstall wo -y - python3 -m pip install --upgrade wordops + python3 -m pip install -I wordops else python3 -m pip uninstall wo -y - python3 -m pip install -U "git+git://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops" + python3 -m pip install -I "git+git://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops" fi cp -rf /usr/local/lib/python3."$python_ver"/dist-packages/usr/* /usr/ cp -rn /usr/local/lib/python3."$python_ver"/dist-packages/etc/* /etc/ diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index c4c341b..c63b670 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -322,14 +322,28 @@ def post_pref(self, apt_packages, packages, upgrade=False): os.makedirs('/etc/nginx/sites-enabled') # 22222 port settings + if os.path.exists('/etc/nginx/sites-available/22222'): + Log.debug(self, "looking for the current backend port") + for line in open('/etc/nginx/sites-available/22222', + encoding='utf-8'): + if 'listen' in line: + listen_line = line.strip() + break + port = (listen_line).split(' ') + current_backend_port = (port[1]).strip() + else: + current_backend_port = '22222' + + if 'current_backend_port' not in locals(): + current_backend_port = '22222' + data = dict(webroot=ngxroot, - release=WOVar.wo_version, port='22222') - if not WOFileUtils.grepcheck( - self, 'WordOps', '/etc/nginx/sites-available/22222'): - WOTemplate.deploy( - self, - '/etc/nginx/sites-available/22222', - '22222.mustache', data, overwrite=True) + release=WOVar.wo_version, port=current_backend_port) + WOTemplate.deploy( + self, + '/etc/nginx/sites-available/22222', + '22222.mustache', data, overwrite=True) + passwd = ''.join([random.choice (string.ascii_letters + string.digits) for n in range(24)]) From 913d5edf229c4ff706f0ea7c814d3b199dd19a54 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 22 Apr 2020 17:50:01 +0200 Subject: [PATCH 13/27] Improve phpmyadmin upgrade * query phpmyadmin.net api to get the latest version --- .gitattributes | 1 + config/bash_completion.d/wo_auto.rc | 10 +++++----- wo/cli/plugins/secure.py | 12 +++++++----- wo/cli/plugins/stack_upgrade.py | 7 ++++--- wo/core/download.py | 18 ++++++++++++++++-- 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.gitattributes b/.gitattributes index b8caf52..bed5029 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,6 +17,7 @@ *.bash text eol=lf *.fish text eol=lf *.sh text eol=lf +*.rc text eol=lf # Source files # ============ diff --git a/config/bash_completion.d/wo_auto.rc b/config/bash_completion.d/wo_auto.rc index d76acf7..e7642dd 100644 --- a/config/bash_completion.d/wo_auto.rc +++ b/config/bash_completion.d/wo_auto.rc @@ -154,7 +154,7 @@ _wo_complete() "create") COMPREPLY=( $(compgen \ - -W "--user --pass --email --html --php --php73 --php74 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --wpredis --wprocket --wpce -le --letsencrypt --letsencrypt=wildcard -le=wildcard --dns --dns=dns_cf --dns=dns_dgon" \ + -W "--user --pass --email --html --php --php72 --php73 --php74 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --wpredis --wprocket --wpce -le --letsencrypt --letsencrypt=wildcard -le=wildcard --dns --dns=dns_cf --dns=dns_dgon" \ -- $cur) ) ;; @@ -206,7 +206,7 @@ _wo_complete() "--wp") if [ "${COMP_WORDS[1]}" != "debug" ]; then if [ "${COMP_WORDS[2]}" == "create" ]; then - retlist="--wp --wpsc --wpfc --user --email --pass --wpredis --wprocket --wpce --letsencrypt -le --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_dgon --php73 --php74" + retlist="--wp --wpsc --wpfc --user --email --pass --wpredis --wprocket --wpce --letsencrypt -le --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_dgon --php72 --php73 --php74" elif [ "${COMP_WORDS[2]}" == "update" ]; then retlist="--wp --wpfc --wpsc --php72 --php73 --php74 --wpredis --wprocket --wpce -le --letsencrypt --letsencrypt=wildcard -le=wildcard --dns --dns=dns_cf --dns=dns_dgon" else @@ -225,7 +225,7 @@ _wo_complete() "--wpsubdir" | "--wpsubdomain") if [ "${COMP_WORDS[1]}" != "debug" ]; then if [ "${COMP_WORDS[2]}" == "create" ]; then - retlist="--wpsc --wpfc --user --email --pass --wpredis --wprocket --wpce -le -le=wildcard --letsencrypt --letsencrypt=wildcard --php73 --php74 --dns --dns=dns_cf --dns=dns_dgon" + retlist="--wpsc --wpfc --user --email --pass --wpredis --wprocket --wpce -le -le=wildcard --letsencrypt --letsencrypt=wildcard --php72 --php73 --php74 --dns --dns=dns_cf --dns=dns_dgon" elif [ "${COMP_WORDS[2]}" == "update" ]; then retlist="--wpfc --wpsc --php72 --php73 --php74 --wpredis --wprocket --wpce -le -le=wildcard --letsencrypt --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_dgon" else @@ -243,7 +243,7 @@ _wo_complete() "--wpredis" | "--wprocket" | "--wpce" | "--wpfc" | "--wpsc" | "--wpsubdir" | "--wpsubdomain" | "--user" | "--pass" | "--email" | "--wp") if [ "${COMP_WORDS[2]}" == "create" ]; then - retlist="--user --pass --email --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --php73 --php74 -le -le=wildcard --letsencrypt --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_dgon" + retlist="--user --pass --email --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --php72 --php73 --php74 -le -le=wildcard --letsencrypt --letsencrypt=wildcard --dns --dns=dns_cf --dns=dns_dgon" else retlist="" fi @@ -267,7 +267,7 @@ _wo_complete() -- $cur) ) ;; - "--web" | "--admin" | "--nginx" | "--php" | "--php73" | "--php74" | "--mysql" | "--wpcli" | "--phpmyadmin" | "--adminer" | "--utils" | "--fail2ban" | "--ufw" | "--redis" | "--phpredisadmin" | "--netdata" | "--sendmail" | "--composer" | "--proftpd" | "--cheat" | "--nanorc" | "--clamav") + "--web" | "--admin" | "--nginx" | "--php" | "--php73" | "--php74" | "--mysql" | "--wpcli" | "--phpmyadmin" | "--adminer" | "--utils" | "--fail2ban" | "--ufw" | "--redis" | "--phpredisadmin" | "--netdata" | "--sendmail" | "--composer" | "--proftpd" | "--cheat" | "--nanorc" | "--clamav" | "--dashboard") if [[ "${COMP_WORDS[2]}" == "install" || "${COMP_WORDS[2]}" == "purge" || "${COMP_WORDS[2]}" == "remove" ]]; then retlist="--web --admin --security --nginx --php --php73 --php74 --mysql --wpcli --phpmyadmin --adminer --utils --redis --fail2ban --ufw --phpredisadmin --netdata --force" elif [[ "${COMP_WORDS[2]}" == "start" || "${COMP_WORDS[2]}" == "reload" || "${COMP_WORDS[2]}" == "restart" || "${COMP_WORDS[2]}" == "stop" ]]; then diff --git a/wo/cli/plugins/secure.py b/wo/cli/plugins/secure.py index ae74baa..619e907 100644 --- a/wo/cli/plugins/secure.py +++ b/wo/cli/plugins/secure.py @@ -133,15 +133,16 @@ class WOSecureController(CementBaseController): @expose(hide=True) def secure_ip(self): """IP whitelisting""" - WOGit.add(self, ["/etc/nginx"], - msg="Add Nginx to into Git") + if os.path.exists('/etc/nginx'): + WOGit.add(self, ["/etc/nginx"], + msg="Add Nginx to into Git") pargs = self.app.pargs if not pargs.user_input: ip = input("Enter the comma separated IP addresses " "to white list [127.0.0.1]:") pargs.user_input = ip try: - user_ip = pargs.user_input.split(',') + user_ip = pargs.user_input.strip().split(',') except Exception as e: Log.debug(self, "{0}".format(e)) user_ip = ['127.0.0.1'] @@ -170,8 +171,9 @@ class WOSecureController(CementBaseController): 'Harden SSH security [y/N]') if start_secure != "Y" and start_secure != "y": Log.error(self, "Not hardening SSH security") - WOGit.add(self, ["/etc/ssh"], - msg="Adding SSH into Git") + if os.path.exists('/etc/ssh'): + WOGit.add(self, ["/etc/ssh"], + msg="Adding SSH into Git") Log.debug(self, "check if /etc/ssh/sshd_config exist") if os.path.isfile('/etc/ssh/sshd_config'): Log.debug(self, "looking for the current ssh port") diff --git a/wo/cli/plugins/stack_upgrade.py b/wo/cli/plugins/stack_upgrade.py index 983ebc4..244f4ee 100644 --- a/wo/cli/plugins/stack_upgrade.py +++ b/wo/cli/plugins/stack_upgrade.py @@ -76,6 +76,7 @@ class WOStackUpgradeController(CementBaseController): packages = [] self.msg = [] pargs = self.app.pargs + wo_phpmyadmin = WODownload.pma_release(self) if not (pargs.web or pargs.nginx or pargs.php or pargs.php72 or pargs.php73 or pargs.php74 or pargs.mysql or pargs.ngxblocker or pargs.all or pargs.netdata or @@ -207,7 +208,7 @@ class WOStackUpgradeController(CementBaseController): "https://files.phpmyadmin.net" "/phpMyAdmin/{0}/phpMyAdmin-{0}-" "all-languages.tar.gz" - .format(WOVar.wo_phpmyadmin), + .format(wo_phpmyadmin), "/var/lib/wo/tmp/pma.tar.gz", "PHPMyAdmin"]] else: @@ -403,13 +404,13 @@ class WOStackUpgradeController(CementBaseController): .format(WOVar.wo_webroot)), ('/var/lib/wo/tmp/phpMyAdmin-{0}' '-all-languages/config.inc.php' - .format(WOVar.wo_phpmyadmin)) + .format(wo_phpmyadmin)) ) WOFileUtils.rm(self, '{0}22222/htdocs/db/pma' .format(WOVar.wo_webroot)) shutil.move('/var/lib/wo/tmp/phpMyAdmin-{0}' '-all-languages/' - .format(WOVar.wo_phpmyadmin), + .format(wo_phpmyadmin), '{0}22222/htdocs/db/pma/' .format(WOVar.wo_webroot)) WOFileUtils.chown(self, "{0}22222/htdocs" diff --git a/wo/core/download.py b/wo/core/download.py index a67c486..81c9738 100644 --- a/wo/core/download.py +++ b/wo/core/download.py @@ -36,7 +36,7 @@ class WODownload(): return False return 0 - def latest_release(self, repository): + def latest_release(self, repository, name=False): """Get the latest release number of a GitHub repository.\n repository format should be: \"user/repo\"""" try: @@ -48,5 +48,19 @@ class WODownload(): except requests.RequestException as e: Log.debug(self, str(e)) Log.error(self, "Unable to query GitHub API") + if name: + return github_json["name"] + else: + return github_json["tag_name"] - return github_json["tag_name"] + def pma_release(self): + """Get the latest phpmyadmin release number from a json file""" + try: + req = requests.get( + 'https://www.phpmyadmin.net/home_page/version.json', + timeout=(5, 30)) + pma_json = req.json() + except requests.RequestException as e: + Log.debug(self, str(e)) + Log.error(self, "Unable to query phpmyadmin API") + return pma_json["version"] From 449bef04307e8d9acb975544c05ad2c4459f750d Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 23 Apr 2020 16:36:30 +0200 Subject: [PATCH 14/27] Fix phpmyadmin stack install --- wo/cli/plugins/stack.py | 9 +++++---- wo/cli/plugins/stack_pref.py | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index b60d670..52faa25 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -299,10 +299,11 @@ class WOStackController(CementBaseController): if not os.path.isdir('/var/www/22222/htdocs/db/pma'): Log.debug(self, "Setting packages variable " "for phpMyAdmin ") - packages = packages + [["https://github.com/phpmyadmin/" - "phpmyadmin/archive/STABLE.tar.gz", - "/var/lib/wo/tmp/pma.tar.gz", - "phpMyAdmin"]] + packages = packages + [[ + "https://www.phpmyadmin.net/" + "downloads/phpMyAdmin-latest-all-languages.tar.gz", + "/var/lib/wo/tmp/pma.tar.gz", + "PHPMyAdmin"]] else: Log.debug(self, "phpMyAdmin already installed") Log.info(self, "phpMyAdmin already installed") diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index c63b670..0cb01d9 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -21,6 +21,7 @@ from wo.core.sslutils import SSL from wo.core.template import WOTemplate from wo.core.variables import WOVar from wo.core.stackconf import WOConf +from wo.core.download import WODownload def pre_pref(self, apt_packages): @@ -1266,6 +1267,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): # PHPMyAdmin if any('/var/lib/wo/tmp/pma.tar.gz' == x[1] for x in packages): + wo_phpmyadmin = WODownload.pma_release(self) WOExtract.extract( self, '/var/lib/wo/tmp/pma.tar.gz', '/var/lib/wo/tmp/') Log.debug(self, 'Extracting file /var/lib/wo/tmp/pma.tar.gz to ' @@ -1279,7 +1281,9 @@ def post_pref(self, apt_packages, packages, upgrade=False): .format(WOVar.wo_webroot)) if not os.path.exists('{0}22222/htdocs/db/pma/' .format(WOVar.wo_webroot)): - shutil.move('/var/lib/wo/tmp/phpmyadmin-STABLE/', + shutil.move('/var/lib/wo/tmp/phpMyAdmin-{0}' + '-all-languages/' + .format(wo_phpmyadmin), '{0}22222/htdocs/db/pma/' .format(WOVar.wo_webroot)) shutil.copyfile('{0}22222/htdocs/db/pma' From b31aadb3e800259fa22afe6432dfffde71ff5833 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 23 Apr 2020 16:44:23 +0200 Subject: [PATCH 15/27] Improve adminer install/upgrade * always get the latest release from adminer.org --- wo/cli/plugins/stack.py | 5 +---- wo/cli/plugins/stack_upgrade.py | 5 +---- wo/core/variables.py | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 52faa25..43c91f5 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -346,10 +346,7 @@ class WOStackController(CementBaseController): .format(WOVar.wo_webroot)): Log.debug(self, "Setting packages variable for Adminer ") packages = packages + [[ - "https://github.com/vrana/adminer/" - "releases/download/v{0}" - "/adminer-{0}.php" - .format(WOVar.wo_adminer), + "https://www.adminer.org/latest.php", "{0}22222/" "htdocs/db/adminer/index.php" .format(WOVar.wo_webroot), diff --git a/wo/cli/plugins/stack_upgrade.py b/wo/cli/plugins/stack_upgrade.py index 244f4ee..f73df85 100644 --- a/wo/cli/plugins/stack_upgrade.py +++ b/wo/cli/plugins/stack_upgrade.py @@ -221,10 +221,7 @@ class WOStackUpgradeController(CementBaseController): .format(WOVar.wo_webroot)): Log.debug(self, "Setting packages variable for Adminer ") packages = packages + [[ - "https://github.com/vrana/adminer/" - "releases/download/v{0}" - "/adminer-{0}.php" - .format(WOVar.wo_adminer), + "https://www.adminer.org/latest.php", "{0}22222/" "htdocs/db/adminer/index.php" .format(WOVar.wo_webroot), diff --git a/wo/core/variables.py b/wo/core/variables.py index 146bcba..af67a19 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -14,7 +14,7 @@ class WOVar(): """Intialization of core variables""" # WordOps version - wo_version = "3.11.4" + wo_version = "3.11.5" # WordOps packages versions wo_wp_cli = "2.4.0" wo_adminer = "4.7.5" From 5ce74f7af0e6f0b73365cc17de660c79321df9ea Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 23 Apr 2020 17:04:21 +0200 Subject: [PATCH 16/27] update changelog --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c405ec..b057590 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Set opcache.preload_user for PHP 7.4 - Link to GitHub changelog after WordOps upgrade +- Automated PHPMyAdmin and Adminer latest release download and install +- Enable Let's Encrypt SSL on sites with http auth (PR [#254](https://github.com/WordOps/WordOps/pull/254)) + +#### Changed + +- Improved caching rules (PR [#265](https://github.com/WordOps/WordOps/pull/265)) #### Fixed -- MySQL databases backup when using remote MySQL serverlll +- MySQL databases backup when using remote MySQL server +- PHPMyAdmin assets missing after installation +- Missing WP-CLI argument when switching site URL to https (PR [#257](https://github.com/WordOps/WordOps/pull/257)) ### v3.11.4 - 2020-01-17 From 2475d1c4b3c86bd510095ab4f929e2a771007c14 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 24 Apr 2020 15:59:35 +0200 Subject: [PATCH 17/27] Add Ubuntu 20.04 support to install script --- install | 6 +++--- setup.py | 2 +- wo/core/variables.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install b/install index 0656fe8..6de09ee 100755 --- a/install +++ b/install @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------- # wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.11.5 - 2020-02-11 +# Version 3.12.0 - 2020-04-24 # ------------------------------------------------------------------------- # CONTENTS @@ -167,9 +167,9 @@ wo_check_distro() { wo_lib_echo_fail "Feel free to open a pull-request if you want to add support for another Linux distributions" exit 100 else - check_wo_linux_distro=$(lsb_release -sc | grep -E "xenial|bionic|disco|jessie|stretch|buster") + check_wo_linux_distro=$(lsb_release -sc | grep -E "xenial|bionic|disco|jessie|stretch|buster|focal") if [ -z "$check_wo_linux_distro" ]; then - wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 16.04/18.04/19.04 LTS, Debian 9.x/10.x and Raspbian 9.x/10x.\n + wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 16.04/18.04/20.04 LTS, Debian 9.x/10.x and Raspbian 9.x/10x.\n You can bypass this warning by adding the flag --force to the install command" exit 100 fi diff --git a/setup.py b/setup.py index 06a64dc..b7ca510 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ if os.geteuid() == 0: os.makedirs('/var/lib/wo/tmp/') setup(name='wordops', - version='3.11.4', + version='3.12.0', description='An essential toolset that eases server administration', long_description=LONG, long_description_content_type='text/markdown', diff --git a/wo/core/variables.py b/wo/core/variables.py index af67a19..3840790 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -14,11 +14,11 @@ class WOVar(): """Intialization of core variables""" # WordOps version - wo_version = "3.11.5" + wo_version = "3.12.0" # WordOps packages versions wo_wp_cli = "2.4.0" wo_adminer = "4.7.5" - wo_phpmyadmin = "5.0.1" + wo_phpmyadmin = "5.0.2" wo_extplorer = "2.1.13" wo_dashboard = "1.2" From e415fe827a8fa2c61467439e36b8c6b1896ead76 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Sat, 2 May 2020 18:16:26 +0200 Subject: [PATCH 18/27] Testing MariaDB on Ubuntu 20.04 --- install | 12 ++++++------ wo/cli/plugins/stack_pref.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/install b/install index 6de09ee..de8094b 100755 --- a/install +++ b/install @@ -419,8 +419,8 @@ wo_install_acme_sh() { export LE_WORKING_DIR="/etc/letsencrypt" export LE_CONFIG_HOME="/etc/letsencrypt/config" /etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --upgrade --auto-upgrade - /etc/letsencrypt/acme.sh --config-home "/etc/letsencrypt/config" --uninstall-cronjob - /etc/letsencrypt/acme.sh --config-home "/etc/letsencrypt/config" --install-cronjob + /etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --uninstall-cronjob + /etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --install-cronjob fi } @@ -429,13 +429,12 @@ wo_install_acme_sh() { wo_install() { local python_ver python_ver=$(python3 -c "import sys; print(sys.version_info[1])") - cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 - rm -f /usr/local/bin/wo + if [ -d /usr/local/lib/python3."$python_ver"/dist-packages ]; then + cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 + fi if [ "$wo_branch" = "master" ]; then - python3 -m pip uninstall wo -y python3 -m pip install -I wordops else - python3 -m pip uninstall wo -y python3 -m pip install -I "git+git://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops" fi cp -rf /usr/local/lib/python3."$python_ver"/dist-packages/usr/* /usr/ @@ -445,6 +444,7 @@ wo_install() { # Clone Github repository if it doesn't exist wo_travis_install() { + local python_ver python_ver=$(python3 -c "import sys; print(sys.version_info[1])") if [ -d ./dist ]; then rm -rf dist diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 0cb01d9..ba9cf77 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -29,7 +29,7 @@ def pre_pref(self, apt_packages): if ("mariadb-server" in apt_packages or "mariadb-client" in apt_packages): # add mariadb repository excepted on raspbian and ubuntu 19.04 - if (not WOVar.wo_distro == 'raspbian'): + if ((not WOVar.wo_distro == 'raspbian') and (not WOVar.wo_platform_codename == 'focal')): Log.info(self, "Adding repository for MySQL, please wait...") mysql_pref = ( "Package: *\nPin: origin mariadb.mirrors.ovh.net" From fd65e3c7e3bccd0243343153a3e739c1dc87e772 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 4 May 2020 16:36:12 +0200 Subject: [PATCH 19/27] Add variable php version into site --- wo/cli/plugins/site_functions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index 1bb1d32..c18e6fd 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -872,6 +872,7 @@ def site_package_check(self, stype): '\t$request_filename;\n') if ((pargs.php and pargs.php73) or (pargs.php and pargs.php74) or + (pargs.php and pargs.php72) or (pargs.php73 and pargs.php74) or (pargs.php72 and pargs.php73) or (pargs.php72 and pargs.php74)): Log.error( @@ -883,6 +884,7 @@ def site_package_check(self, stype): 'wpsubdomain']): Log.debug(self, "Setting apt_packages variable for PHP") php_check = 'php7.3-fpm' + php_to_setup = WOVar.wo_php73 if self.app.config.has_section('php'): config_php_ver = self.app.config.get( 'php', 'version') From 77abb969a417e336f59df2589f10d4e6fbeef997 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 4 May 2020 17:11:38 +0200 Subject: [PATCH 20/27] Update changelog and README --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b057590..17a2c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,16 +14,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Link to GitHub changelog after WordOps upgrade - Automated PHPMyAdmin and Adminer latest release download and install - Enable Let's Encrypt SSL on sites with http auth (PR [#254](https://github.com/WordOps/WordOps/pull/254)) +- Ubuntu 20.04 LTS Support (testing) +- New Nginx 1.18.0 package built with OpenSSL 1.1.1g +- Default PHP version can be set in /etc/wo/wo.conf #### Changed - Improved caching rules (PR [#265](https://github.com/WordOps/WordOps/pull/265)) +- Default PHP version is now 7.3 #### Fixed - MySQL databases backup when using remote MySQL server - PHPMyAdmin assets missing after installation - Missing WP-CLI argument when switching site URL to https (PR [#257](https://github.com/WordOps/WordOps/pull/257)) +- WordOps installation failure with pip +- Installation on raspberry pi 4 +- Fail2ban configuration when Nginx is not installed + ### v3.11.4 - 2020-01-17 diff --git a/README.md b/README.md index e0bc159..a76b43c 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ - **Easy to install** : One step automated installer with migration from EasyEngine v3 support - **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation -- **Custom Nginx build** : Nginx 1.16.1 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support +- **Custom Nginx build** : Nginx 1.18.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support - **Up-to-date** : PHP 7.2, 7.3 & 7.4, MariaDB 10.3 & Redis 5.0 - **Secured** : Hardened WordPress security with strict Nginx location directives - **Powerful** : Optimized Nginx configurations with multiple cache backends support From ed83c2d54d6d65ab4f0b46b3b777807c366a26fa Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 4 May 2020 17:21:36 +0200 Subject: [PATCH 21/27] install php7.3 by default --- CHANGELOG.md | 1 - wo/cli/plugins/stack.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17a2c60..d1ab833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Installation on raspberry pi 4 - Fail2ban configuration when Nginx is not installed - ### v3.11.4 - 2020-01-17 #### Fixed diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 43c91f5..71e02d6 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -142,7 +142,7 @@ class WOStackController(CementBaseController): if pargs.web: pargs.nginx = True - pargs.php72 = True + pargs.php73 = True pargs.mysql = True pargs.wpcli = True pargs.sendmail = True @@ -587,7 +587,7 @@ class WOStackController(CementBaseController): if pargs.web: pargs.nginx = True - pargs.php72 = True + pargs.php73 = True pargs.mysql = True pargs.wpcli = True pargs.sendmail = True @@ -898,7 +898,7 @@ class WOStackController(CementBaseController): if pargs.web: pargs.nginx = True - pargs.php72 = True + pargs.php73 = True pargs.mysql = True pargs.wpcli = True pargs.sendmail = True From 24457d6b3131c227417c4cd3637136f22fc47e3e Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 4 May 2020 17:26:10 +0200 Subject: [PATCH 22/27] Fix mariadb configuration on Ubuntu 20.04 --- wo/cli/plugins/stack_pref.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index ba9cf77..0c46003 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1000,8 +1000,12 @@ def post_pref(self, apt_packages, packages, upgrade=False): inno_buffer=wo_ram_innodb, inno_log_buffer=wo_ram_log_buffer, innodb_instances=wo_innodb_instance) - WOTemplate.deploy( - self, '/etc/mysql/my.cnf', 'my.mustache', data) + if os.path.exists('/etc/mysql/mariadb.conf.d/50-server.cnf'): + WOTemplate.deploy( + self, '/etc/mysql/my.cnf', 'my.mustache', data) + else: + WOTemplate.deploy( + self, '/etc/mysql/my.cnf', 'my.mustache', data) # replacing default values Log.debug(self, "Tuning MySQL configuration") if os.path.isdir('/etc/systemd/system/mariadb.service.d'): From 0f5fd0a349ff91a720fa8a2ea33c3cb7f187b518 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 4 May 2020 19:33:10 +0200 Subject: [PATCH 23/27] Fix php-memcached on Ubuntu 20.04 --- wo/core/variables.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/wo/core/variables.py b/wo/core/variables.py index 3840790..50b18f8 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -140,18 +140,22 @@ class WOVar(): "zip", "xml", "soap"] wo_php72 = [] for module in wo_module: - wo_php72 = wo_php72 + ["php7.2-{0}".format(module), - "php7.2-recode"] + wo_php72 = wo_php72 + ["php7.2-{0}".format(module)] + wo_php72 = wo_php72 + ["php7.2-recode"] wo_php73 = [] for module in wo_module: - wo_php73 = wo_php73 + ["php7.3-{0}".format(module), - "php7.3-recode"] + wo_php73 = wo_php73 + ["php7.3-{0}".format(module)] + wo_php73 = wo_php73 + ["php7.3-recode"] wo_php74 = [] for module in wo_module: wo_php74 = wo_php74 + ["php7.4-{0}".format(module)] - wo_php_extra = ["php-memcached", "php-imagick", "php-igbinary", - "graphviz", "php-xdebug", "php-msgpack", "php-redis"] + if not wo_platform_codename == 'focal': + wo_php_extra = ["php-memcached", "php-imagick", "php-igbinary", + "graphviz", "php-xdebug", "php-msgpack", "php-redis"] + else: + wo_php_extra = ["php-imagick", "php-igbinary", + "graphviz", "php-xdebug", "php-msgpack", "php-redis"] wo_mysql = ["mariadb-server", "percona-toolkit"] if wo_distro == 'raspbian': From 596e7bf03b2839d7e684e5da427f626d677b84dd Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 12 May 2020 01:42:04 +0200 Subject: [PATCH 24/27] Fix wo-kernel service start --- CHANGELOG.md | 3 +++ install | 9 ++++++++- wo/cli/plugins/stack_pref.py | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1ab833..8cad937 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] +### v3.12.0 - 2020-05-11 + #### Added - Set opcache.preload_user for PHP 7.4 @@ -31,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - WordOps installation failure with pip - Installation on raspberry pi 4 - Fail2ban configuration when Nginx is not installed +- Wo-kernel systemd service start failure ### v3.11.4 - 2020-01-17 diff --git a/install b/install index de8094b..951ec10 100755 --- a/install +++ b/install @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------- # wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.12.0 - 2020-04-24 +# Version 3.12.0 - 2020-05-12 # ------------------------------------------------------------------------- # CONTENTS @@ -644,6 +644,12 @@ wo_woconf() { fi } +wo_fix_kernel() { + if [ -f /opt/wo-kernel.sh ]; then + chmod +x /opt/wo-kernel.sh + fi +} + wo_init() { ### @@ -718,6 +724,7 @@ else if [ -x /usr/local/bin/wo ]; then _run wo_clean _run wo_woconf + _run wo_fix_kernel # 2 - Migration from EEv3 else if [ -x /usr/local/bin/ee ]; then diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 0c46003..751a2b9 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1709,6 +1709,7 @@ def pre_stack(self): if not os.path.isfile('/opt/wo-kernel.sh'): WOTemplate.deploy(self, '/opt/wo-kernel.sh', 'wo-kernel-script.mustache', data) + WOFileUtils.chmod(self, '/opt/wo-kernel.sh', 0o700) if not os.path.isfile('/lib/systemd/system/wo-kernel.service'): WOTemplate.deploy( self, '/lib/systemd/system/wo-kernel.service', From 469dd1bfd8d82c59277c7457cac9ff0d9b169822 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 12 May 2020 01:51:52 +0200 Subject: [PATCH 25/27] Fix missing letsencrypt settings in wo.conf --- CHANGELOG.md | 1 + install | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cad937..ad95fbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Installation on raspberry pi 4 - Fail2ban configuration when Nginx is not installed - Wo-kernel systemd service start failure +- Fix missing letsencrypt settings in wo.conf ### v3.11.4 - 2020-01-17 diff --git a/install b/install index 951ec10..6ca8f6e 100755 --- a/install +++ b/install @@ -641,6 +641,12 @@ wo_woconf() { if grep -q "log.logging" /etc/wo/wo.conf; then sed -i "s/log.logging/log.colorlog/g" /etc/wo/wo.conf fi + if ! grep -q "letsencrypt" /etc/wo/wo.conf; then + echo -e '\n[letsencrypt]\n\nkeylength = "ec-384"' >>/etc/wo/wo.conf + fi + if ! grep -q "php" /etc/wo/wo.conf; then + echo -e '\n[php]\n\nversion = 7.3' >>/etc/wo/wo.conf + fi fi } From 34d640cd2211e1a5172268d2234eff9c2d6c8c8e Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 12 May 2020 14:57:12 +0200 Subject: [PATCH 26/27] Fix MariaDB innodb_buffer_pool_instances --- wo/cli/templates/my.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wo/cli/templates/my.mustache b/wo/cli/templates/my.mustache index cbb14b6..69e22bc 100644 --- a/wo/cli/templates/my.mustache +++ b/wo/cli/templates/my.mustache @@ -143,7 +143,7 @@ innodb_file_per_table = 1 innodb_open_files = 500000 innodb_io_capacity = 500000 innodb_flush_method = O_DIRECT -innodb_buffer_pool_instances = {{innodb_instances}} +innodb_buffer_pool_instances = 1 # # * Security Features # From 327bd96d1603f7d70f3e5ba92677d43b51d92bae Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 13 May 2020 13:57:44 +0200 Subject: [PATCH 27/27] Prepare for release v3.12.0 --- CHANGELOG.md | 7 ++++--- README.md | 13 +++++++------ config/wo.conf | 10 +++++----- install | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad95fbc..699747d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] -### v3.12.0 - 2020-05-11 +### v3.12.0 - 2020-05-13 #### Added @@ -16,7 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Link to GitHub changelog after WordOps upgrade - Automated PHPMyAdmin and Adminer latest release download and install - Enable Let's Encrypt SSL on sites with http auth (PR [#254](https://github.com/WordOps/WordOps/pull/254)) -- Ubuntu 20.04 LTS Support (testing) +- Ubuntu 20.04 LTS Support (experimental) - New Nginx 1.18.0 package built with OpenSSL 1.1.1g - Default PHP version can be set in /etc/wo/wo.conf @@ -34,7 +34,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Installation on raspberry pi 4 - Fail2ban configuration when Nginx is not installed - Wo-kernel systemd service start failure -- Fix missing letsencrypt settings in wo.conf +- missing letsencrypt settings in wo.conf +- MariaDB issue with innodb_buffer_pool_instances ### v3.11.4 - 2020-01-17 diff --git a/README.md b/README.md index a76b43c..d3adc99 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ #### Also compatible +- Ubuntu 20.04 LTS (Focal) (experimental) - Ubuntu 16.04 LTS (Xenial) - Debian 9 (Stretch) - Debian 10 (Buster) @@ -82,8 +83,8 @@ Detailed Getting Started guide with additional installation methods can be found ### Standard WordPress sites ```bash -wo site create example.com --wp # install wordpress without any page caching -wo site create example.com --wp --php73 # install wordpress with PHP 7.3 without any page caching +wo site create example.com --wp # install wordpress with PHP 7.3 without any page caching +wo site create example.com --wp --php72 # install wordpress with PHP 7.2 without any page caching wo site create example.com --wp --php74 # install wordpress with PHP 7.4 without any page caching wo site create example.com --wpfc # install wordpress + nginx fastcgi_cache wo site create example.com --wpredis # install wordpress + nginx redis_cache @@ -118,11 +119,11 @@ wo site create example.com --wpsubdomain --wpce # install wpmu-subdomain + C ```bash wo site create example.com --html # create example.com for static/html sites -wo site create example.com --php # create example.com with php support -wo site create example.com --php73 # create example.com with php 7.3 support +wo site create example.com --php # create example.com with php 7.3 support +wo site create example.com --php72 # create example.com with php 7.2 support wo site create example.com --php74 # create example.com with php 7.4 support -wo site create example.com --mysql # create example.com with php & mysql support -wo site create example.com --mysql --php73 # create example.com with php 7.3 & mysql support +wo site create example.com --mysql # create example.com with php 7.3 & mysql support +wo site create example.com --mysql --php72 # create example.com with php 7.2 & mysql support wo site create example.com --mysql --php74 # create example.com with php 7.4 & mysql support wo site create example.com --proxy=127.0.0.1:3000 # create example.com with nginx as reverse-proxy ``` diff --git a/config/wo.conf b/config/wo.conf index bad2f5a..2a9fa94 100644 --- a/config/wo.conf +++ b/config/wo.conf @@ -76,6 +76,11 @@ email = keylength = "ec-384" +[php] + +### Default PHP version +version = 7.3 + [update] ### If enabled, load a plugin named `update` either from the Python module @@ -88,8 +93,3 @@ enable_plugin = true ### `wo.cli.plugins.example` or from the file path ### `/var/lib/wo/plugins/example.py` enable_plugin = true - -[php] - -### Default PHP version -version = 7.3 diff --git a/install b/install index 6ca8f6e..58216f2 100755 --- a/install +++ b/install @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------- # wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.12.0 - 2020-05-12 +# Version 3.12.0 - 2020-05-13 # ------------------------------------------------------------------------- # CONTENTS