How to debug CyberPanel properly:
First, please execute the following command:
touch /usr/local/CyberCP/debug
This command will initiate the generation of additional debug logs. If you encounter any issues with CyberPanel, you can run this command and subsequently capture the output from `/home/cyberpanel/error-logs.txt`.
Next, try the following commands to gather more information:
cat /usr/local/lsws/logs/error.log | grep “your IP or domain or whatever you wish to debug”
Alternatively, you can use:
tail -f /usr/local/lsws/logs/error.log
While executing the steps that are causing the issue.
Another crucial log file to consider is:
/usr/local/lsws/logs/access.log
If you do not see any relevant output, you may also try:
journalctl -u lshttpd -b –no-pager
or even:
journalctl -f lshttpd
Additionally, you may find the following log important:
/usr/local/lsws/logs/auditmodsec.log
This log pertains to mod_security. I have personally encountered issues with Cyrillic letters being blocked due to mod_security rules in CyberPanel.
If all else fails, you may consider upgrading CyberPanel using the following command:
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O – https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
Should you receive an error during the upgrade process similar to the following:
ImportError: cannot import name ‘DEFAULT_STORAGE_ALIAS’ from ‘django.conf’ (/usr/local/lib/python3.9/site-packages/django/conf/__init__.py)
It is advisable to upgrade Django, as discussed in the article linked here:
-> https://stackoverflow.com/questions/76052630/importerror-from-django-conf-import-default-storage-alias-settings
You can perform the upgrade with the following command:
pip3 install –upgrade django