Commit Graph

58 Commits

Author SHA1 Message Date
master3395
d17b7f1c7d Fix log parsing: correctly reconstruct resource path and timestamp
- Fixed timestamp parsing to combine fields 3 and 4 (timestamp can be split across fields)
- Fixed resource path parsing to handle query parameters (path may span multiple fields)
- Fixed size extraction to use field 9 instead of field 8 (size comes after status code)
- Resource path now correctly reconstructed until HTTP/version field is found
2026-01-19 18:55:56 +01:00
master3395
dfeeeb16a7 Fix: Remove fallback to master domain log file for child domains
- Removed fallback logic that was reading from master domain log file when child domain log file was empty
- This was causing cross-contamination - showing API logs when viewing cmstest logs
- Now only reads from the specific domain's log file as determined by _get_log_file_path()
- Fixed log parsing to correctly extract resource path (field 5) and size (field 8)
- Log format doesn't include domain name, so domain is determined by which log file is read

The issue was that when cmstest log file was old/empty, the code was falling back to
reading from newstargeted.com.access_log which contained logs from all sub-domains,
causing API logs to appear when viewing cmstest logs.
2026-01-19 18:55:32 +01:00
master3395
78a69096ef Add domain filtering to access log display
- Added domain filtering in getDataFromLogFile() to only show log entries for the requested domain
- Handles cases where vhost config hasn't been updated and multiple sub-domains log to the same file
- Filters out entries from other domains even if they're in the same log file
- Added error handling for malformed log entries
- Added fallback to master domain log file if child domain log file doesn't exist or is empty

This ensures that when viewing logs for a sub-domain, only that sub-domain's logs are displayed,
even if the vhost configuration still points to the master domain's log file (which needs to be fixed separately).
2026-01-19 18:49:06 +01:00
master3395
fdf5b2abcb Fix sub-domain log viewing: properly handle child domain log paths
- Added _get_log_file_path() helper method to correctly determine log file paths
- For child domains (sub-domains), logs are stored in master domain's log directory
- Updated getDataFromLogFile() and fetchErrorLogs() to use the helper method
- Fixes issue where sub-domain logs couldn't be viewed in CyberPanel UI
- Logs are now correctly located at /home/{master_domain}/logs/{subdomain}.{access|error}_log

This resolves the bug where viewing logs for sub-domains would fail because
the code was looking for logs in /home/{subdomain}/logs/ instead of the
correct location /home/{master_domain}/logs/{subdomain}.{access|error}_log
2026-01-19 18:39:19 +01:00
master3395
58f7d5d855 Fix AngularJS delimiters in modifyWebsite template for consistency 2026-01-19 18:24:11 +01:00
master3395
85be82a69d Fix Django template syntax error - use AngularJS delimiters for || operator 2026-01-19 18:23:54 +01:00
master3395
b44b626d16 Add Django filesize template filter to fix createUser and modifyWebsite errors 2026-01-19 18:20:57 +01:00
Master3395
c3abff58f4 Download CDN libraries locally to eliminate tracking prevention warnings. Updated index.html to reference local copies of qrious.min.js and chart.umd.min.js. Added functionality in install.py and upgrade.py to download these libraries before running collectstatic. Updated website.html to ensure compatibility with the new local scripts. 2026-01-01 05:29:46 +01:00
Master3395
18b1bad51f Refactor configuration modification methods for improved safety and validation
- Introduced a `safeModifyHttpdConfig` method in `installUtilities` to handle modifications to the OpenLiteSpeed configuration file with backup, validation, and rollback capabilities.
- Updated various modules (`modSec.py`, `sslUtilities.py`, `tuning.py`, `vhost.py`, etc.) to utilize the new safe modification method, enhancing reliability and preventing configuration corruption.
- Improved error handling and logging throughout the configuration modification processes to ensure better traceability and debugging.
2025-12-31 23:13:53 +01:00
Master3395
7c692ab250 Implement .htaccess feature banner and extraction support in file manager
- Added a new fixed position banner in the index.html to announce .htaccess support, including styling and functionality for showing and dismissing the notification.
- Enhanced file manager to support extraction of 7z and rar file formats, with appropriate command handling in filemanager.py.
- Updated JavaScript files to determine extraction types based on file extensions, ensuring compatibility with new formats.
- Modified HTML templates to include options for 7z and rar compression types in the user interface.
https://github.com/usmannasir/cyberpanel/issues/1617#issue-3727006951

These changes improve user experience by providing clear notifications and expanding file management capabilities within CyberPanel.
2025-12-17 19:19:00 +01:00
Master3395
ddf9f5a9b3 Add cron service restart functionality in CronUtil
- Introduced a static method `restartCronService` to restart the cron service across various distributions, ensuring immediate application of changes.
- Updated `website.py` to call `restartCronService` after modifying cron jobs, with error handling to return appropriate responses if the restart fails.
- Enhanced overall reliability of cron job management by ensuring the service is restarted after changes are made.
https://github.com/usmannasir/cyberpanel/issues/1589
2025-10-29 22:55:38 +01:00
usmannasir
8767a730d9 bug fix: quote errors 2025-09-30 15:56:12 +05:00
usmannasir
978d660c5d bug fix: circular import 2025-09-27 14:13:33 +05:00
usmannasir
3d19448b0d bug fix: circular import 2025-09-27 13:38:57 +05:00
usmannasir
ea3f74b0b9 add missing models to website.py 2025-09-27 13:09:20 +05:00
Master3395
2c57ad595e Enhance CyberPanel functionality with FTP Quota and Bandwidth Management features: Added models, views, and templates for managing FTP quotas and bandwidth resets. Implemented IP blocking functionality with associated views and templates. Updated system scripts for improved repository synchronization and OS detection. Removed outdated workflow files. 2025-09-23 21:09:38 +02:00
Usman Nasir
e91df945ae Merge pull request #1510 from master3395/v2.5.5-dev
V2.5.5 dev - Firewall ban button, and management
2025-09-23 12:29:21 +05:00
usmannasir
9b9a9cae44 Merge branch 'v2.4.4' into v2.5.5-dev 2025-09-23 10:59:13 +05:00
usmannasir
4408ca04c8 bug fix: staging site issue 2025-09-22 18:16:05 +05:00
usmannasir
503c464e48 bug fix: staging site issue 2025-09-22 17:46:10 +05:00
usmannasir
f48e7286df bug fix: staging site issue 2025-09-22 16:57:35 +05:00
usmannasir
ecd44c9d6a bug fix: staging site issue 2025-09-22 14:08:51 +05:00
usmannasir
fb16f4cf56 bug fix: staging site issue 2025-09-22 13:31:20 +05:00
Master3395
cc07f12017 Add cron job management for website suspension: Implement methods to suspend, restore, and check the status of cron jobs for websites. Update main function to handle new commands for cron management. Enhance child domain handling to ensure cron jobs are suspended/restored appropriately during website suspension processes.
https://github.com/usmannasir/cyberpanel/issues/1097
2025-09-21 20:45:37 +02:00
Master3395
53aea56136 Add home directory management features: Introduce models and views for managing user home directories, including dynamic home directory assignment during user creation. Update frontend to allow selection of home directories and display relevant information. Enhance backend logic for home directory migration and statistics retrieval, improving overall user management capabilities. 2025-09-20 21:50:22 +02:00
Master3395
76f6d346f1 Enhance PHP version management in PHPManager: Implement comprehensive detection of PHP versions across multiple methods, including system checks and package manager queries. Add validation and configuration fixing for PHP installations. Introduce methods to retrieve the latest and recommended PHP versions, improving overall reliability and user feedback in the website management process. 2025-09-20 21:01:51 +02:00
Master3395
af434bcb89 Enhance file deletion process in FileManager: Implement detailed logging for file and directory deletion, including security checks and error handling. Improve handling of immutable flags and ensure proper permissions for suspension pages in website management. Add fallback mechanisms for system file deletions and enhance user feedback on operations. 2025-09-20 20:39:35 +02:00
usmannasir
f57cf9e865 debian 12: add missing views to views.py in websitefunctions 2025-09-19 14:34:05 +05:00
usmannasir
339419fc22 debian 12 2025-09-19 14:15:14 +05:00
usmannasir
0dc48bd0b6 debian 12 2025-09-19 12:15:28 +05:00
Master3395
6213ff8fdd Add subdomain log fix functionality and update templates. Introduce new views and URLs for fixing subdomain logs, enhance log configuration handling in the upgrade script, and update vHost configuration paths for better log management. Include a new menu item for accessing the log fix interface. 2025-09-18 22:04:05 +02:00
Master3395
8ca3ae1b49 Remove SECURITY_INSTALLATION.md and implement SSL reconciliation features in manageSSL module. Add new views and URLs for SSL reconciliation, enhance mobile responsiveness in templates, and update SSL utilities for improved functionality. Update upgrade script for scheduled SSL reconciliation tasks. 2025-09-18 21:37:48 +02:00
Master3395
9c9d0f3075 Enhance CyberPanel with new features and improvements, including a file integrity verification system, IP blocking functionality, and support for resetting Apache and vHost configurations to default. Update documentation and guides for better user experience. Fix bandwidth reset issues and improve overall system stability. 2025-09-18 20:45:34 +02:00
Master3395
97fd4e055a Enhance security by adding rel="noopener" to external links
- Updated multiple HTML templates to include rel="noopener" on links that open in a new tab, improving security by preventing potential reverse tabnabbing attacks.
- This change affects various templates across the backup, base, file manager, mail server, and website functions sections.
2025-09-13 17:44:37 +02:00
Master3395
c06533b986 Fix ALL documentation links.
Fix ALL documentation links.
2025-09-08 11:50:35 +02:00
usmannasir
6963755099 bug fix: font issues 2025-08-30 00:19:22 +05:00
usmannasir
6000be27e3 bug fix: font issues 2025-08-29 23:23:53 +05:00
usmannasir
b0baf47254 bug fix: font issues 2025-08-29 23:07:30 +05:00
usmannasir
232014a4cb feature: ssl status in list websites 2025-08-22 21:10:13 +05:00
usmannasir
f2352bd516 feature: ssl status in list websites 2025-08-22 21:00:03 +05:00
usmannasir
651324b464 bug fix: https://github.com/usmannasir/cyberpanel/issues/1471 2025-08-08 00:56:41 +05:00
usmannasir
f800152103 dark mode in cron page 2025-08-06 03:15:50 +05:00
usmannasir
7dcb2a49fe dark mode in cron page 2025-08-06 03:07:32 +05:00
usmannasir
7aa86bd13c apache manager dark mode 2025-08-06 03:00:18 +05:00
usmannasir
df7a2732dd dark mode in cron page 2025-08-06 02:51:20 +05:00
usmannasir
8bd4068f92 bug fix: https://github.com/usmannasir/cyberpanel/issues/1463 2025-08-06 02:38:55 +05:00
usmannasir
54112d07b8 add/delete records 2025-08-05 14:29:26 +05:00
usmannasir
8d7c15d49b wp site home dark page 2025-08-05 13:59:26 +05:00
usmannasir
7fa25212dd wp site home dark page 2025-08-05 03:31:07 +05:00
usmannasir
7244e7981f wp site home dark page 2025-08-05 03:23:32 +05:00