4

How to change the Document Root for a specific domain/subdomain inside ISPConfig 3.

I need to point my subdomain to a different directory than the standard client3 web6 roots.

And in "ISPConfig 3" this field isn't editable, neither during creation nor afterwards.

Mohd Abdul Mujib
  • 13,071
  • 8
  • 64
  • 88

2 Answers2

20

The solution was pretty simple, All I had to do is, once the domain was created, I had to navigate as below..

Select that domain > Options > Apache Directives

And paste the following line where the root of the domain/subdomain would be adjusted accordingly. I wanted to point the domain to rainloop installation which was outside the Default Web Root directory /var/www/html.

DocumentRoot "/var/www/rainloop/"

Have written this Q/A as a documentation as in-spite of it being so simple, this solution isn't documented anywhere.

Mohd Abdul Mujib
  • 13,071
  • 8
  • 64
  • 88
  • 1
    for me only works on http schema ... when I want to access the site via https, it still relay on old path.. – Adrian Covaci May 10 '20 at 14:07
  • 1
    The Answer from Mohd Abdul Mujib still is correct, but today (ISPConfig Version 3.2.x) the Apache Directives are found in Sites > Options > Apache Directives there you can input what you need. i.e. Document Root "your/new/folder" – Alex Hammerschmied Nov 23 '21 at 13:50
-1

Hey yeah you can put this as directive snippsel:

DocumentRoot {DOCROOT_CLIENT}/YOURNEWFOLDER

in complete that shows something like this in your /etc/apache2/sites-available/ in the lower, isp config put this in:

DocumentRoot /var/www/clients/client10/web72/web/YOURNEWFOLDER

chris_yooo
  • 41
  • 5