I've noticed two issues with subdomains in CyberPanel:
1- If you create a subdomain and its path is public_html, CyberPanel will not create a directory for it inside the public_html folder. Instead, it will only create an index.html file in the main public_html folder. This is a problem because if you delete this subdomain and choose to delete its root folder, the entire public_html folder will be deleted.
2- If you have an old subdomain directory that is inside the public_html folder (this was possible before), and you delete this subdomain and its folder, CyberPanel will delete the entire public_html folder. This means that all of your files will be lost.
To Reproduce
Create a subdomain and put "public_html" as its path;
Delete that subdomain.
The "public_html" folder is deleted.
Expected behavior
CyberPanel should create the subdomain inside public_html folder.
CyberPanel shouldn't delete the public_html folder when deleting that subdomain with its root folder.
I've noticed two issues with subdomains in CyberPanel: 1- If you create a subdomain and its path is public_html, CyberPanel will not create a directory for it inside the public_html folder. Instead, it will only create an index.html file in the main public_html folder. This is a problem because if you delete this subdomain and choose to delete its root folder, the entire public_html folder will be deleted. 2- If you have an old subdomain directory that is inside the public_html folder (this was possible before), and you delete this subdomain and its folder, CyberPanel will delete the entire public_html folder. This means that all of your files will be lost.
To Reproduce
Expected behavior
Operating system: Ubuntu 20.04 LTS
CyberPanel version: 2.3.4