How to(correctly) configure custom virtualhost directory structure?

tarasm

Registered
Sep 21, 2010
4
0
51
Hello,

By default, subdomains and/or add-on domains get a sub-directory in public_html, so, when test.example.com subdomain is added, the directory structure looks like this: ~/public_html/test

I'm trying to configure my cpanel virtualhost configuration in a slightly different layout.

I would like for each subdomain and/or add-on domain to have a directory inside of ~/sites/, so the previous example would have directory structure of ~/sites/test.example.com with document root in ~/sites/test.example.com/html.

What is the proper way of configuring this?

From the looks of it, I can cause something similar to happen by modifying the userdata files, but I was wandering if there is some place for the default values of the userdata files? Or if there is another, better, way to do this?

Thank you,
Taras