feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7 phases of the codebase: - Foundation: OLS paths, variables, services, removed pynginxconfig dep - Templates: 11 new OLS mustache templates, removed nginx-specific ones - Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate - Site: site_functions, site, site_create, site_update - Plugins: debug, info, log, clean rewritten for OLS - SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks - Other: secure, backup, clone, install script Additional features: - Debian 13 (trixie) support - PHP 8.5 support - WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock) - --nginx CLI flag preserved for backward compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -115,10 +115,17 @@ class WOVar():
|
||||
wo_mysql_host = "localhost"
|
||||
|
||||
# WordOps stack installation variables
|
||||
# Nginx repo and packages
|
||||
if wo_distro == 'ubuntu':
|
||||
wo_nginx_repo = "ppa:wordops/nginx-wo"
|
||||
# OpenLiteSpeed path constants
|
||||
wo_ols_conf_dir = '/usr/local/lsws/conf'
|
||||
wo_ols_vhost_dir = '/usr/local/lsws/conf/vhosts'
|
||||
wo_ols_bin = '/usr/local/lsws/bin/openlitespeed'
|
||||
wo_ols_ctrl = '/usr/local/lsws/bin/lswsctrl'
|
||||
|
||||
# OpenLiteSpeed repo and packages
|
||||
if wo_distro == 'ubuntu':
|
||||
wo_ols_repo = ("deb [signed-by=/usr/share/keyrings/openlitespeed-keyring.gpg] "
|
||||
"http://rpms.litespeedtech.com/debian/ "
|
||||
"{0} main".format(wo_platform_codename))
|
||||
else:
|
||||
if wo_distro == 'debian':
|
||||
if wo_platform_codename == 'buster':
|
||||
@@ -127,6 +134,8 @@ class WOVar():
|
||||
wo_deb_repo = "Debian_11"
|
||||
elif wo_platform_codename == 'bookworm':
|
||||
wo_deb_repo = "Debian_12"
|
||||
elif wo_platform_codename == 'trixie':
|
||||
wo_deb_repo = "Debian_13"
|
||||
elif wo_distro == 'raspbian':
|
||||
if wo_platform_codename == 'buster':
|
||||
wo_deb_repo = "Raspbian_10"
|
||||
@@ -134,14 +143,14 @@ class WOVar():
|
||||
wo_deb_repo = "Raspbian_11"
|
||||
elif wo_platform_codename == 'bookworm':
|
||||
wo_deb_repo = "Raspbian_12"
|
||||
# debian/raspbian nginx repository
|
||||
wo_nginx_repo = ("deb [signed-by=/usr/share/keyrings/wordops-archive-keyring.gpg] "
|
||||
"http://download.opensuse.org"
|
||||
f"/repositories/home:/virtubox:/WordOps/{wo_deb_repo}/ /")
|
||||
wo_nginx_key = (f"https://download.opensuse.org/repositories/home:virtubox:WordOps/{wo_deb_repo}/Release.key")
|
||||
elif wo_platform_codename == 'trixie':
|
||||
wo_deb_repo = "Raspbian_13"
|
||||
wo_ols_repo = ("deb [signed-by=/usr/share/keyrings/openlitespeed-keyring.gpg] "
|
||||
"http://rpms.litespeedtech.com/debian/ "
|
||||
"{0} main".format(wo_platform_codename))
|
||||
|
||||
wo_nginx = ["nginx-custom", "nginx-wo"]
|
||||
wo_nginx_key = 'FB898660'
|
||||
wo_ols = ["openlitespeed"]
|
||||
wo_ols_repo_key = "https://rpms.litespeedtech.com/debian/lst_debian_repo.gpg"
|
||||
|
||||
wo_php_versions = {
|
||||
'php74': '7.4',
|
||||
@@ -150,27 +159,34 @@ class WOVar():
|
||||
'php82': '8.2',
|
||||
'php83': '8.3',
|
||||
'php84': '8.4',
|
||||
'php85': '8.5',
|
||||
}
|
||||
|
||||
def generate_php_modules(version_prefix, version_number):
|
||||
wo_module = ["bcmath", "cli", "common", "curl", "fpm", "gd", "igbinary",
|
||||
def generate_lsphp_modules(version_prefix, version_number):
|
||||
"""Generate LSPHP module package list for a given PHP version.
|
||||
LSPHP packages use lsphpXX- naming (no dot in version)."""
|
||||
short_ver = version_number.replace('.', '')
|
||||
wo_module = ["common", "curl", "gd", "igbinary",
|
||||
"imagick", "imap", "intl", "mbstring", "memcached", "msgpack",
|
||||
"mysql", "opcache", "readline", "redis", "soap", "xdebug",
|
||||
"mysql", "opcache", "redis", "soap",
|
||||
"xml", "zip"]
|
||||
php_modules = ["php{0}-{1}".format(version_number, module) for module in wo_module]
|
||||
|
||||
# lsphp packages: lsphpXX, lsphpXX-common, lsphpXX-curl, etc.
|
||||
php_modules = ["lsphp{0}".format(short_ver)]
|
||||
php_modules.extend(["lsphp{0}-{1}".format(short_ver, module) for module in wo_module])
|
||||
|
||||
if version_prefix == 'php74':
|
||||
php_modules.extend(["php{0}-geoip".format(version_number),
|
||||
"php{0}-json".format(version_number)])
|
||||
php_modules.extend(["lsphp{0}-json".format(short_ver)])
|
||||
|
||||
return php_modules
|
||||
|
||||
wo_php74 = generate_php_modules('php74', '7.4')
|
||||
wo_php80 = generate_php_modules('php80', '8.0')
|
||||
wo_php81 = generate_php_modules('php81', '8.1')
|
||||
wo_php82 = generate_php_modules('php82', '8.2')
|
||||
wo_php83 = generate_php_modules('php83', '8.3')
|
||||
wo_php84 = generate_php_modules('php84', '8.4')
|
||||
wo_php74 = generate_lsphp_modules('php74', '7.4')
|
||||
wo_php80 = generate_lsphp_modules('php80', '8.0')
|
||||
wo_php81 = generate_lsphp_modules('php81', '8.1')
|
||||
wo_php82 = generate_lsphp_modules('php82', '8.2')
|
||||
wo_php83 = generate_lsphp_modules('php83', '8.3')
|
||||
wo_php84 = generate_lsphp_modules('php84', '8.4')
|
||||
wo_php85 = generate_lsphp_modules('php85', '8.5')
|
||||
|
||||
wo_php_extra = ["graphviz"]
|
||||
|
||||
@@ -194,14 +210,14 @@ class WOVar():
|
||||
f"{mariadb_ver}/{wo_distro} {wo_platform_codename} main")
|
||||
mariadb_repo_key = "https://mariadb.org/mariadb_release_signing_key.pgp"
|
||||
if wo_distro == 'ubuntu':
|
||||
wo_php_repo = "ppa:ondrej/php"
|
||||
# LSPHP comes from LiteSpeed repo (same as OLS)
|
||||
wo_php_repo = wo_ols_repo
|
||||
wo_goaccess_repo = ("ppa:alex-p/goaccess")
|
||||
|
||||
else:
|
||||
wo_php_repo = (
|
||||
"deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] "
|
||||
f"https://packages.sury.org/php/ {wo_platform_codename} main")
|
||||
wo_php_key = '95BD4743'
|
||||
# LSPHP comes from LiteSpeed repo (same as OLS)
|
||||
wo_php_repo = wo_ols_repo
|
||||
wo_php_key = wo_ols_repo_key
|
||||
wo_redis_key_url = "https://packages.redis.io/gpg"
|
||||
wo_redis_repo = (
|
||||
"deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] "
|
||||
|
||||
Reference in New Issue
Block a user