Child Domains outside of public_html folder

Would be nice to be able to set child domains outside of public_html folder, this way you can organize better your website.

I agree! I was hoping that my sub-domain could be at the same directory level as public_html, ie with path /home/domain.com/sub-domain.com/ (instead of /home/domain.com/public_html/sub-domain.com/). The current structure is limiting what can be installed on the sub-domain, for that reason I might have to switch control panels.

Agree. It will be good if the user decides where to put the location.

I can add it as feature but in v2.0.1. Dev already stopped for v2.0.0. Will create new branch today.

I started a laravel project in the domain name. I have to specify public_html / project / public path so that I can use it in the main domain. I have a subdomain. It is also included in public_html. I have to map the main domain start folder to the public folder of the laravel project without affecting it.

@AnAlien

I’ve added this feature in the v2.0.1 branch just now. But this will be the current active dev branch moving forward.

You can either install or upgrade to this version when asked for version prompt.

ok I accidentally opened the topic again. can you close

When does the 2.0.1 stable version come? @usmannasir

@AnAlien

It may take 1-2 months, I just created the branch. v2.0.0 just released few days ago.

I can’t find an option to delete a child domain, only the main domain, am I missing something? The documents at 3 - Creating and Managing Child Domains - 04 - Websites - CyberPanel Community seem look like they relate to an earlier version.

Found delete a child domain under main domain Manage > Domains list

What I tried on v2.0

  • create the subdomain > add domains (with default settings)

  • move the previously created folder > file manager > move sub.example.com to /home/example.com
    You’ll get home/example.com/sub.example.com/

  • edit vHost Conf
    docRoot /home/example.com/sub.example.com

  • Now I have one last problem to resolve - Rewrite rules
    cat: /home/example.com/public_html/sub.example.com/.htaccess: No such file or directory

I can’t figure where it’s defined the .htaccess path

more updates about.

  • Litespeed load the correct .htaccess file from the new folder defined in vHost. That’s good. Seams that only Cyperpanel in the website management page can’t read the new location because in the child domains path it registered the original path from child domain creation.
    The path from List Domains:
    /home/example.com/public_html/sub.example.com

  • Also after we change the docRoot to the new location outside /public_html/
    Failed to obtain SSL

Will be interesting to see what would happen when the actual SSL expire and the new one should be obtained.