CyberPanel Community

Child Domains outside of public_html folder

Al
Alexbruma #1

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

12 replies
Ni
NickW #2

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.

w3
w3services #3

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

Cy
CyberPanel #4

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

An
AnAlien #5

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.

An
AnAlien #7

ok I accidentally opened the topic again. can you close

us
usmannasir #9

@AnAlien

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

Ni
NickW #11

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

ch
chiareu #12

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

ch
chiareu #13

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.

Sign in to reply