different document root for domain and install script

It is possible to change the website entry point for example.com and www.example.com to example/public_html/typo3/ and stats.example.com to example/public_html/stats/ without a forward (I don't like a domain like www.example.com/typo3/)? The problem is if I change the Document Root to /typo3 the Virtualmin install script installs all tools under the typo3/ folder. Any update of typo3 will remove then the other tool. Thanks a lot.



One solution might be: You could manually create the "typo3" directory and use the VMin function Services / Configure Website / Document Options to change the document root directory after domain creation. The docroot given in the VMin template is only applied during domain creation, so it should not try to revert it to "public_html" later.

Yes, the correct way to do this is to change the document root directory on the Website Options page. You can do this after installing typo3 via the script installer feature.

Don't make the change by just editing the Apache config directly, as this can confuse Virtualmin.

thanks a lot for you answers. If I do this after the typo3 installation, the stats folder is still on the same level as the typo3 folder and can not be accesed from web. therforce I like to point a subdomain to it (like stats.example.com), is this also possible?

Post #3 goes along nicely with my recent suggestion on the forum to have "manageable" Apache Aliases, in addition to manageable subdomains. ;)

If, instead of a subdomain, you still wish to have "example.com/stats" for Webalizer, one thing you could do is create an Alias in Server Configuration / Website Redirects, to have "/stats" point to "/home/{username}/public_html/stats". I think that should work.

(Note: right now there's a little bug in that function and it will create an Apache Redirect instead of an Alias. The next version 3.82 has that fixed, for now you can use Services / Configure Website / Aliases and Redirect to create the Alias on a somewhat "lower level".)

If you wish to actually have "stats.example.com", you could create a sub-server for "example.com" with the appropriate domain name, and set Server Configuration / Website Options / Website documents sub-directory to "/home/{mainserveruser}/public_html/stats". I think that should work too.

Locutus is correct - you can use the Website Redirects feature to create an alias from /stats to the correct location. Or a least you will be able to in the 3.82 release ... that feature has some bugs in 3.81.