changing docroot of domain to a custom one in latest directadmin release

mik3ca

New member
Joined
May 31, 2026
Messages
3
I'm trying to figure out how to modify the document root of a domain using the latest DirectAdmin. DirectAdmin was downloaded to the server 2 days ago. When I get to the domain configuration screen under the admin account, I can see the contents of the main httpd.conf file that apache loads and i see a bunch of links listing template files in the /usr/local/directadmin/data folder.

When I click on customize, I was expecting to see directadmin code showing what folders the domain points to but all I see are two empty boxes, so then I think there's a way to do it from within the server shell itself. Yes I have full SSH access.

If i modified or created a file in the /etc/httpd/conf/extra folder (I think that's where it is where the miscellaneous files are loaded for apache), what special command would I need to run to make DirectAdmin understand the changes before restarting/reloading apache?

And will those files in the extra folder remain in-tact, or will they be overwritten by DirectAdmin?

I ask because I prefer to update the docroot through SSH without DirectAdmin screwing up the settings afterwards, and its apparent if I modify the httpd.conf in the /etc/conf folder then it will be overwritten.

Thanks.
 
You should be able to change the docroot via directadmin anyway? Maybe it's more helpfull if you can explain which docroot you want to have.

Best is to not change any of the template files. There are instructions in the docs how to customize them in a /custom directory.

Same for changes in the /etc/httpd/conf/extra because those won't be changed on an Apache update.
You need to use the instructions for customisation.

Check these docs especially:
and

Changing the docroot can be done like this too:
 
Say for example, I setup a domain exclusively through DirectAdmin, then later in Linux I store the website contents in ram and want to set docroot to that.

Let's assume the mount point is the folder /ramroot on the entire server and it has the same permissions as the original docroot for the domain.

In a typical virtualhost block in a standard apache configuration, I would use this line:

Code:
DocumentRoot /ramroot

After looking at your docs, I believe the best way is to copy the existing virtualhost block for the domain on the server, append the block to the end of the file /etc/httpd/conf/extra/httpd-includes.conf and change the DocumentRoot accordingly.

Or is there something I am missing?
 
Back
Top