Subdomains after web root change

HAUSa

New member
Joined
Nov 5, 2009
Messages
2
Hi all,

Because I use a framework that has its own home directory, I changed the web root for one of my domains. Instead of public_html/ it is now public_html/web/.

Now I created a subdomain ("trac"), and ofcouse a folder named "trac" is created in my public_html/. When I visit the subdomain in the browser, I get the 500 Internal Server Error. I thought that was because I changed the web root, so I manually created another folder named "trac" in my public_html/web/. But it still doesn't work, I still get the 500 Internal Server Error!

Anyone who can help me with this?
 
There's nothing in the error log. Can't find "trac" in it.

The problem is the web root for the subdomain and the changed web root for the main domain.

There is one interesting thing: if I go to an unexistable subdomain (like "fajdsklfajdgkla.domain.com" :p) the browser says "Apache is functioning normally". And when I create a subdomain and go then go there, I get a 500 Internal Server Error...
 
DirectAdmin realy doesn't natively support a changed webroot. Perhaps DirectAdmin support staff will give us a workaround.

Jeff
 
Hello,

As Jeff mentioned, it's not setup by default.
You'd probably have to use this guide to change multiple aspects of the VirtualHost in order to make it work:
http://help.directadmin.com/item.php?id=2

This is because suPhp (for one example) is only specified within a <Directory |DOCROOT|>, so you'd have to change that as well.

More related guides:
http://help.directadmin.com/item.php?id=3
http://help.directadmin.com/item.php?id=199

Note that is is in the versions system to be implemented as some point:
http://www.directadmin.com/features.php?id=1007
But cannot say exactly when that will happen (if not for 1.34.2).

John
 
Hello, will we see here can time an opportunity to select the root path for a subdomain ?
It's one thing missing in DirectAdmin, and use the Password Protected Directories, which operate only in the domain root.
 
I was just coming in new to this, because this information was published in June 2009. ;)
 
Last edited:
Let me revive this topic because it's been almost a year since I posted my request and still no change, it is only to be pushing on future versions.
Would it be possible to have this new feature ?
Until that is operational functions I use the method mentioned above, except that it does not use the system for access by password, by the fact that what is used in the domain name.
Hope to see during this year out of this feature ?
 
Hello,

It is in the versions system:
http://www.directadmin.com/features.php?id=1007

However, the current issue is that the virtual_host2_sub*.conf files not quite correct, as described here:
http://help.directadmin.com/item.php?id=199

It's a very easy change for us to make, which would allow the feature to be added very easily, however the issue is backwards compatibility. If we change the format of the template, all custom DOCROOT options that have been already added will break when they update DA.

John
 
I understand it, why not add a parameter that allows you to switch from one mode to another, this will explain it as you do not ask those who desire to use the method of docroot, and also allow time for make the change gradually.
I think this could also solve the problem to protect files that are not necessarily in the main public_html.
If for example I put my subdomain to this location: /home/admin/subdmains/sub.domain.tld/public_html
Well I can not use my filemanager in the "Protect".
 
Back
Top