These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Changing document root for website on the new forum.
I`m making a new website while the old is still online
I`m maiking the new one, in a directory in root called version2.
When I`m all done I want to change from the old version to the new version in folder"version2"
How and where do I change so the new website root will be "version2"
from this
/home/site/public_html
to this
/home/site/public_html/version2
regards bison
when done, why not move the old site to /oldsite and the site in /version2 to root?
That's much easier than changing your doc root in apache
ronald has a point. :)
If you have to change the root of the active page for some reason: The Document Root entry would have to be changed (not directly accessible through Virtualmin for existing servers - you need to use Services / Configure Website / Document Options), and possibly a redirect for "/" to "/version2" is required so that the correct version is loaded when a user fetches your URL with just the hostname.
Even better, but also more complicated, than a redirect would be using Apache's mod_rewrite; then the user would not see the "/version2/" in the URL path.
All in all, moving directories indeed would be easier.