@Joriz, thanks for the feedback.
I agree completely removing users ability to change document root sounds tempting. I mean as a way of preventing them of from causing themselves some problems by accident. However this approach takes away a very important feature from a more advanced users. Depending on their website framework or just code-base in general it might be necessary for them to be able to change document root.
We are trying to make it best for both types of users by making docroot change operation is as much foolproof as possible but still allowing it. For example - DA will refuse to change docroot to a non-existing directory. If directory is removed afterwards DA will revert to using the default docrtoot directory (at config regenerate stage).
I must admit - making default subdomain docroot something configurable (in
directadmin.conf
) is a fair feature request. Still we are a bit reluctant to jump on it right away. Key reason behind it is because there is no easy way to express default subdomain docroot location as a simple string. It contains variable parts like domain, full subdomain, subdomain prefix. It would mean introducing some kind of placeholders system or mini template system just to parse this one option. If there would be a really strong use case for it we could reconsider, but right now I think the complexity involved in making it configurable is not worth the benefits it gives.
My opinion is that it would be ideal just to stop worrying about the document root location and embrace the idea that it can be changed. Meaning we should not really force any structure on it. Old accounts will have their docroots in old location, new accounts in new location, advanced users will most likely use completely custom location. As long as DA is aware of where it is it will be fine.
From the operational complexity there is nothing to worry about. DirectAdmin takes care of setting
SDOCROOT
to the actual subdomain document root. So as long as you use tokens (not hard-coded paths) in config templates everything should will be fine.
Hope this gives some insight in how we see this issue.