Change document root for main domain via GUI from user level

Marek Miklewicz

It would be nice to have ability to change Document Root for main domain from user level, similarly like subdomain document root change. We have a lot of requests on our shared hosting to change DocumentRoot for user domain for example if he uses laravel and needs to change documentRoot from /home/user/domains/domain.com/public_html to /home/user/domains/domain.com/public_html/public.


Activity Newest / Oldest


Roman Mazur

While developers are focusing on global things, like discarding some OS'es support / licensing types, I made own realisation for document_root on templates with custom_domain_items (feature).

Add to /usr/local/directadmin/data/admin/custom_domain_items.conf


then modify /usr/local/directadmin/data/templates/custom/virtual_host2.conf and /usr/local/directadmin/data/templates/custom/virtual_host2_secure.conf accordingly
In the beginning:
|*if CUSTOM_DOMAIN_ITEM_customdocroot|
|*if CUSTOM_DOMAIN_ITEM_customdocroot="0"|
In VirtualHost section: replace DocumentRoot with
DocumentRoot |REALDOCROOT|

Congrats, yo've done it.


Selim Koç

I did not want to add a new feature request, but the one I will write is similar. If we add a domain pointer, we don't have custom SSL options for the pointer domain. If we add a domain as a regular domain, we don't have control over the document root for that domain (for example I would like to add a domain with the same document root as the main domain but with custom SSL). So having the ability to change the document root for non-main domains, will solve our problem (setting it to be the same as the main domain). Alternatively, a domain pointer with a custom SSL certificate will also solve the problem. Currently, we solve the problem with manual work, but it could be better done via the DirectAdmin panel.


Sabah Alkhadoka

I what to watch a moive



Status changed to: Planned


Krystian Ż

It's the same with us too. Please add an option to change docroot for domains by users