Commit Graph

43 Commits

Author SHA1 Message Date
usmannasir 2e8d9d5e8e conflict fix 2025-11-09 19:34:57 +05:00
usmannasir 6b999e5c8b Fix RHEL 9 binary filenames to match server structure
RHEL 9 binaries use '-rhel' suffix instead of '-rhel9':
- openlitespeed-phpconfig-x86_64-rhel (not rhel9)
- cyberpanel_ols_x86_64_rhel.so (not rhel9.so)

Updated URLs in install and upgrade modules to use correct filenames.
2025-11-09 17:14:47 +05:00
usmannasir 7c6ce4cd72 Fix OS detection to prioritize Ubuntu/Debian check
Ubuntu systems were incorrectly being detected as rhel9. Added explicit
Ubuntu/Debian check at the beginning of detectBinarySuffix() before
checking for RHEL-based distributions.

This ensures Ubuntu and Debian systems are properly identified and use
the correct binaries from the ubuntu/ directory instead of rhel9/.
2025-11-09 17:12:23 +05:00
usmannasir 20254f467c Add support for RHEL 8 and RHEL 9 custom binaries
Update OS detection and binary distribution to support separate binaries
for AlmaLinux/RHEL 8 and 9. The new structure uses:
- rhel8/ directory for AlmaLinux/RHEL 8.x binaries
- rhel9/ directory for AlmaLinux/RHEL 9.x binaries
- ubuntu/ directory for Ubuntu/Debian binaries

Changes:
- Enhanced detectBinarySuffix() to distinguish between RHEL 8 and 9
- Updated binary URLs to use new directory structure
- Updated ModSecurity checksums for all OS variants
- Applied changes to install, upgrade, and ModSecurity modules

This ensures proper ABI compatibility by providing OS-specific builds
with correct glibc and library dependencies for each platform.
2025-11-09 12:10:43 +05:00
usmannasir f7fc75b258 Add binary verification and rollback mechanism for OLS custom binaries
Implement safety checks to verify custom OpenLiteSpeed binaries work before committing to them:

Verification checks:
- Check library dependencies with ldd to detect missing libraries
- Test binary execution with -v flag to ensure it can run
- Detect issues like wrong binary type (ubuntu vs rhel) for the OS

Rollback mechanism:
- Automatically restore original binary from backup if verification fails
- Remove incompatible custom module
- Continue installation with standard OLS if custom binary fails

This prevents installation failures and system downtime when:
- Wrong binary type is downloaded due to OS detection issues
- Library dependencies are missing
- Binary cannot execute on the target system

Changes:
- Added verifyCustomBinary() method to check dependencies and execution
- Added rollbackCustomBinary() method to restore from backup
- Updated installCustomOLSBinaries() to verify and rollback on failure
- Applied to both install/installCyberPanel.py and plogical/upgrade.py

Benefits:
- Zero downtime: System falls back to working binary automatically
- Better error reporting: Shows which libraries are missing
- Safer upgrades: Users won't be left with broken installations
2025-11-07 13:50:47 +05:00
usmannasir 39b74cb9b7 Fix OLS binary compatibility by detecting OS distribution
Add OS detection logic to download correct OpenLiteSpeed binaries based on system type:
- Ubuntu/Debian systems: Download binaries with libcrypt.so.1 (GLIBC 2.35)
- RHEL/AlmaLinux/Rocky 8+/9+: Download binaries with libcrypt.so.2 (GLIBC 2.34)

This fixes the "libcrypt.so.2: cannot open shared object file" error that occurred
when Ubuntu systems tried to use RHEL-compiled binaries.

Changes:
- Added detectBinarySuffix() method to both installCyberPanel.py and upgrade.py
- Updated binary URLs to use https://cyberpanel.net with OS-specific suffix
- Module URL: cyberpanel_ols_x86_64_{ubuntu|rhel}.so
- Binary URL: openlitespeed-phpconfig-x86_64-{ubuntu|rhel}

Binary compatibility matrix:
- Ubuntu 20.04/22.04/24.04, Debian 10+, CentOS 7 → ubuntu binaries
- AlmaLinux 8+/9+, Rocky 8+/9+, RHEL 8+/9+, OpenEuler → rhel binaries
2025-11-07 12:52:15 +05:00
usmannasir 2952791761 Lower download size threshold to support smaller module files
Reduce minimum file size from 1MB to 10KB to allow the module file
(~35KB) to pass validation. The 1MB threshold was too strict and only
appropriate for the main OLS binary. Now displays size in KB or MB
appropriately.
2025-11-05 09:24:34 +05:00
usmannasir 32a7442dba Fix download verification logic for custom OLS binaries
Change download verification to check file existence and size instead of
relying on return code. The wget command succeeds but install_utils.call()
may not return 0. Now verifies downloaded file exists and is at least 1MB.
2025-11-05 06:08:48 +05:00
usmannasir 73ec9950ec Fix OLS binary download URL
Remove 'downloads' path from OLS binary URL to match correct location
2025-11-05 05:57:01 +05:00
usmannasir e4a06a8aaf Fix custom module download URL
Correct the module URL to https://cyberpanel.net/cyberpanel_ols_x86_64.so
2025-11-05 05:56:27 +05:00
usmannasir f907351873 Add custom OpenLiteSpeed binary installation with .htaccess PHP config support
Integrate custom OLS binaries during installation to enable Apache-style
php_value/php_flag directives in .htaccess files. The installer now:

- Downloads custom OLS binary and module from cyberpanel.net
- Creates backup of existing binaries before replacement
- Installs custom binaries with enhanced .htaccess support
- Configures CyberPanel module in OpenLiteSpeed config
- Gracefully falls back to standard OLS if download fails
- Only installs on x86_64 architecture

Features enabled by custom binaries:
- Apache-style .htaccess support
- php_value and php_flag directives
- Enhanced header control
- Better Apache compatibility
2025-11-05 05:38:31 +05:00
usmannasir 99b0476358 Merge branch 'v2.4.4' into stable 2025-10-27 19:54:08 +05:00
usmannasir ac6db0e575 bug fix: python 3.6 compatibility 2025-10-10 17:26:50 +05:00
usmannasir e4b2584ae0 Fix AlmaLinux 8 installation: Add python-dotenv to requirements (v2.4.4)
- Install python-dotenv in virtual environment during CyberPanel setup
- Fixes Django's inability to load .env file on AlmaLinux 8
- Resolves "Access denied for user 'cyberpanel'@'localhost'" errors
- Added to all installation paths (normal, DEV, and after_install)

This ensures Django can properly load database credentials from .env file
on AlmaLinux 8 systems where python-dotenv was missing.
2025-10-10 01:00:22 +05:00
usmannasir f34377394d Fix AlmaLinux 8 installation: Add python-dotenv to requirements
- Install python-dotenv in virtual environment during CyberPanel setup
- Fixes Django's inability to load .env file on AlmaLinux 8
- Resolves "Access denied for user 'cyberpanel'@'localhost'" errors
- Added to all installation paths (normal, DEV, and after_install)

This ensures Django can properly load database credentials from .env file
on AlmaLinux 8 systems where python-dotenv was missing.
2025-10-10 00:57:24 +05:00
usmannasir d540b24c8f bug fix: alma8 install 2025-10-10 00:09:42 +05:00
usmannasir 26425dd397 bug fix: allowed host issue 2025-09-15 12:07:15 +05:00
Master3395 1a82700f51 Update PHP version references and improve AlmaLinux 9 compatibility
- Changed PHP symlink from version 8.0 to 8.3 in various scripts to ensure compatibility with the latest PHP version.
- Updated documentation links in the FAQ to point to the new community support page.
- Added checks and fixes for MariaDB installation issues specific to AlmaLinux 9.
- Enhanced the installation script to support additional PHP versions and improve overall installation reliability.
2025-09-15 01:25:52 +02:00
Master3395 7bd66f7f06 Enhance environment variable management and security
- Updated .gitignore to include additional sensitive files and directories.
- Added python-dotenv to requirements for loading environment variables.
- Modified settings.py to load environment variables for sensitive configurations, including SECRET_KEY, DEBUG, and database credentials.
- Implemented secure .env file generation during installation to avoid hardcoding sensitive information.
- Introduced fallback method for settings update if environment generation fails.
2025-09-13 19:07:03 +02:00
Master3395 3d72839b33 Fix mirror gettoforge
https://github.com/usmannasir/cyberpanel/issues/1499
2025-09-12 09:42:52 +02:00
Master3395 41ead838ef Add sieve by default.
Add sieve by default.
2025-09-10 20:01:52 +02:00
Master3395 90abff30ae Fix Mariadb on almalinux 9
Fix Mariadb on almalinux 9
2025-09-10 17:36:09 +02:00
Master3395 c06533b986 Fix ALL documentation links.
Fix ALL documentation links.
2025-09-08 11:50:35 +02:00
Master3395 0c8ee38c2b Add Almalinux 10 and php 84+85
Add Almalinux 10 and php 84+85
2025-09-07 22:57:53 +02:00
Master3395 c49200cca0 Resolve issue 1493
Should solve the issue in https://github.com/usmannasir/cyberpanel/issues/1493
2025-09-07 20:40:29 +02:00
usmannasir c92600a62d bug fix: fix dynamic latest version of lsws server 2025-09-04 23:07:27 +05:00
usmannasir 9a38b98ca9 v2.4.4 release 2025-09-01 13:11:42 +05:00
usmannasir 70c44d05bd bug fix: postfix conf for ipv6 2025-09-01 00:07:41 +05:00
usmannasir 09eac4de1c bug fix: snappymail on ubuntu 24 2025-08-31 19:55:56 +05:00
usmannasir f1f779c618 bug fix: snappymail on ubuntu 24 2025-08-31 13:16:22 +05:00
usmannasir a85e5bd261 bug fix: snappymail on ubuntu 24 2025-08-31 12:32:58 +05:00
usmannasir c4c853ea41 bug fix: snappymail on ubuntu 24 2025-08-30 23:40:20 +05:00
usmannasir 06653ab77c ubuntu 24 ftp fix 2025-08-29 22:30:06 +05:00
usmannasir fcedc2786b bug fix: ubuntu 24 default php for lscpd 2025-08-29 21:37:38 +05:00
usmannasir 6f44494d27 bug fix: for ubuntu 24 2025-08-29 20:44:19 +05:00
usmannasir d0b7ee2e5b bug fix: for ubuntu 24 2025-08-29 20:13:28 +05:00
usmannasir be3c66128c bug fix: postfix/dovecot on alma9 2025-08-19 18:36:48 +05:00
usmannasir 0704e97ff8 bug fixes to wp installation 2025-08-07 06:58:48 +05:00
usmannasir 0a6d544007 potential bug fix in upgrade 2025-08-03 23:26:55 +05:00
usmannasir 695425a8d6 bug fix: https://github.com/usmannasir/cyberpanel/issues/1466 2025-08-02 10:03:09 +05:00
usmannasir 1bca3e0f4d bug fix: https://github.com/usmannasir/cyberpanel/issues/1465 2025-08-02 02:01:04 +05:00
usmannasir 9b509e4a6f release v2.4.3 2025-08-01 15:05:33 +05:00
usmannasir 6dd7114f6d Initial commit for v2.4.3 2025-08-01 14:56:30 +05:00