This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Wildcard subdomain, file manager, ...
#6
RE: Wildcard subdomain, file manager, ...
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/
Reply
Thanks given by: fpinedoh , Trax


Messages In This Thread
RE: Wildcard subdomain, file manager, ... - by Lateral - 09-15-2014, 09:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
How to set up File Manger for Sentora? donaldaugust 1 3 ,284 01-11-2022, 05:01 AM
Last Post: Nigel
Public_html Inside Domain/Subdomain zHostingSolutions 2 4 ,172 07-23-2021, 09:57 AM
Last Post: Nigel
redirect error after letsencrypt + subdomain mizerek 1 4 ,113 08-06-2020, 04:54 AM
Last Post: mizerek

Forum Jump:


Users browsing this thread: 1 Guest(s)