Hey,
I had the exact same problems. I need to assign a different document root and I need a wildcard subdomain entry for my domain. It was not possible using the UI, but with some tricks and the Virtual Host override settings.
So in order to select a different home directory I chose "select existing home directory", manipulated the HTML select/option element using my browsers (Chrome) developer tools and simply changed
Code:
<option value="">/ (root)</option>
to
Code:
<option value="example.com/public">/ (root)</option>
(of course I had this option selected!) on the "Create a new domain" form and submitted.
There really should be another input to specify a custom home directory! I don't think there's anything not working with having different homes set. It's a 5-minute-task to modify the form and script to handle this correctly I guess.
To assign a wildcard subdomain using the VirtualHost settings, go to "Admin -> Module Admin -> Apache Config", scroll down, select the VirtualHost you want to have a wildcard subdomain entry and add the following ServerAlias:
Code:
ServerAlias *.example.com
And you might have to change the open_basedir there, too, if your website needs to include PHP scripts from outside the home directory, as I had to. Because the default value will be your home directory. So you can override the value for the vhost here, too:
Code:
php_admin_value open_basedir "/var/zpanel/hostdata/your_user/public_html/example.com/:/var/zpanel/temp/