usmannasir ae020ece7b Fix OWASP CRS UI toggle state issues and improve installation reliability
This commit resolves issues where the OWASP CRS toggle in ModSecurity settings
would appear to flip back to OFF even when installation succeeded, and improves
detection of manually installed OWASP CRS rules.

Issues Fixed:
1. Toggle not updating immediately after installation/uninstallation
2. Manual OWASP installations to rules.conf not detected by toggle
3. Silent installation failures without detailed error logging

Changes:

firewall/static/firewall/firewall.js:
- Update toggle state immediately after successful installation (getOWASPAndComodoStatus(true))
- Update toggle state after failed installation to show correct OFF state
- Provides instant visual feedback instead of requiring page refresh

firewall/firewallManager.py (getOWASPAndComodoStatus):
- Expand detection logic to check both httpd_config.conf AND rules.conf
- Detect manual OWASP installations (Include/modsecurity_rules_file with owasp/crs-setup)
- Case-insensitive pattern matching for better compatibility

plogical/modSec.py (setupOWASPRules):
- Add specific error logging for each installation step failure
- Log detailed messages: directory creation, download, extraction, configuration
- Helps diagnose: network issues, missing tools (wget/unzip), permission problems

Impact:
- Toggle correctly reflects OWASP CRS state after enable/disable operations
- Manual installations following external tutorials now detected correctly
- Installation failures are logged with specific error messages for debugging
- Improves UX by eliminating perception that "toggle keeps flipping back"

Fixes: OWASP CRS toggle UI bug
Related: Community thread https://community.cyberpanel.net/t/4-mod-security-rules-packages/133/8
Related: Ticket #GTPDPO7EV
2025-11-24 01:53:36 +05:00
2021-11-13 21:20:34 +01:00
2025-09-15 11:26:58 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-04 00:03:02 +05:00
2025-08-04 00:03:02 +05:00
2025-09-01 13:11:42 +05:00
2025-09-12 09:42:52 +02:00
2025-08-29 23:07:30 +05:00
2025-09-08 11:50:35 +02:00
2025-09-08 11:50:35 +02:00
2025-08-01 14:56:30 +05:00
2025-08-29 23:07:30 +05:00
2025-09-08 11:50:35 +02:00
2025-09-08 16:48:38 +02:00
2025-09-04 13:03:10 +05:00
2025-09-07 22:57:53 +02:00
2025-09-08 11:50:35 +02:00
2025-08-05 03:04:38 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-09-08 11:50:35 +02:00
2025-09-07 22:57:53 +02:00
2025-08-29 23:07:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-09-15 12:07:15 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-04 00:03:02 +05:00
2025-08-01 14:56:30 +05:00
2025-09-07 22:57:53 +02:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-01 14:56:30 +05:00
2025-08-04 00:03:02 +05:00

🛠️ CyberPanel

Web Hosting Control Panel powered by OpenLiteSpeed, designed to simplify hosting management.


🔧 Features & Services

  • 🔐 Different User Access Levels (via ACLs).
  • 🌌 Auto SSL for secure websites.
  • 💻 FTP Server for file transfers.
  • 🕒 Light-weight DNS Server (PowerDNS).
  • 🔐 phpMyAdmin to manage databases (MariaDB).
  • 📧 Email Support (SnappyMail).
  • 🕌 File Manager for quick file access.
  • 🌐 PHP Management made easy.
  • 🔒 Firewall (FirewallD & ConfigServer Firewall Integration).
  • 📀 One-click Backups and Restores.
  • 🐳 Docker Management with command execution capabilities.
  • 🤖 AI-Powered Security Scanner for enhanced protection.
  • 📊 Monthly Bandwidth Reset - Automatic bandwidth usage reset (Fixed in latest version).

📖 Documentation & Guides

CyberPanel comes with comprehensive documentation and step-by-step guides:


🔢 Supported PHP Versions

CyberPanel supports a wide range of PHP versions across different operating systems:

☑️ Currently Supported PHP Versions

  • PHP 8.5 - Latest stable version (EOL: Dec 2028)
  • PHP 8.4 - Stable version (EOL: Dec 2027)
  • PHP 8.3 - Stable version (EOL: Dec 2027)
  • PHP 8.2 - Stable version (EOL: Dec 2026)
  • PHP 8.1 - Stable version (EOL: Dec 2025)
  • PHP 8.0 - Legacy support (EOL: Nov 2023)
  • PHP 7.4 - Legacy support (EOL: Nov 2022)

🔧 Third-Party PHP Add-ons

For additional PHP versions or specific requirements, you can install third-party packages:

Ubuntu/Debian

  • Ondrej's PPA: Provides PHP 5.6 to 8.5
  • Sury's PPA: Alternative repository with latest PHP versions

RHEL-based Systems (AlmaLinux, RockyLinux, CentOS, RHEL)

  • Remi Repository: Comprehensive PHP package collection
  • EPEL Repository: Additional packages for enterprise Linux

CloudLinux

  • CloudLinux PHP Selector: Built-in tool for managing multiple PHP versions
  • Remi Repository: Additional PHP versions and extensions

Note

: Third-party repositories may provide additional PHP versions beyond what's available in default repositories. Always verify compatibility with your specific use case.


🌐 Supported Operating Systems

CyberPanel runs on x86_64 architecture and supports the following operating systems:

Currently Supported

  • Ubuntu 24.04.3 - Supported until April 2029 NEW!
  • Ubuntu 22.04 - Supported until April 2027
  • Ubuntu 20.04 - Supported until April 2025
  • AlmaLinux 10 - Supported until May 2030 NEW!
  • AlmaLinux 9 - Supported until May 2032
  • AlmaLinux 8 - Supported until May 2029
  • RockyLinux 9 - Supported until May 2032
  • RockyLinux 8 - Supported until May 2029
  • RHEL 9 - Supported until May 2032
  • RHEL 8 - Supported until May 2029
  • CloudLinux 8 - Supported until May 2029
  • CentOS 9 - Supported until May 2027

🔧 Third-Party OS Support

Additional operating systems may be supported through third-party repositories or community efforts:

  • Debian - May work with Ubuntu-compatible packages
  • openEuler - Community-supported with limited testing
  • Other RHEL derivatives - May work with AlmaLinux/RockyLinux packages

Note

: For unsupported operating systems, compatibility is not guaranteed. Always test in a non-production environment first.


⚙️ Installation Instructions

Install CyberPanel easily with the following command:

sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)

📊 Upgrading CyberPanel

Upgrade your CyberPanel installation using:

sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

🆕 Recent Updates & Fixes

Bandwidth Reset Issue Fixed (January 2025)

  • Issue: Monthly bandwidth usage was not resetting, causing cumulative values to grow indefinitely
  • Solution: Implemented automatic monthly bandwidth reset for all websites and child domains
  • Affected OS: All supported operating systems (Ubuntu, AlmaLinux, RockyLinux, RHEL, CloudLinux, CentOS)
  • Manual Reset: Use /usr/local/CyberCP/scripts/reset_bandwidth.sh for immediate reset
  • Documentation: See Bandwidth Reset Fix Guide

New Operating System Support Added (January 2025)

  • Ubuntu 24.04.3: Full compatibility with latest Ubuntu LTS
  • AlmaLinux 10: Full compatibility with latest AlmaLinux release
  • Long-term Support: Both supported until 2029-2030

📚 Resources

📖 Quick Start Guides

Feature Guide Description
🐳 Docker Command Execution Execute commands in containers
🤖 Security AI Scanner AI-powered security scanning
📧 Email Mautic Setup Email marketing platform
📊 Bandwidth Reset Fix Guide Fix bandwidth reset issues
📚 All Complete Index Browse all available guides

🔧 Troubleshooting

Common Issues & Solutions

Bandwidth Not Resetting Monthly

  • Issue: Bandwidth usage shows cumulative values instead of monthly usage
  • Solution: Run the bandwidth reset script: /usr/local/CyberCP/scripts/reset_bandwidth.sh
  • Prevention: Ensure monthly cron job is running: 0 0 1 * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/postfixSenderPolicy/client.py monthlyCleanup

General Support

  • Check logs: /usr/local/lscp/logs/error.log
  • Verify cron jobs: crontab -l
  • Test manual reset: Use provided scripts in /usr/local/CyberCP/scripts/
Description
Cyber Panel - The hosting control panel for OpenLiteSpeed
Readme GPL-3.0 956 MiB
Languages
JavaScript 74.7%
HTML 9.1%
Python 8.8%
CSS 5.9%
Shell 0.9%
Other 0.6%