Score:0

VirtualMin Changing default document_root for Virtual Servers

cn flag

I am currently using the latest version of Virtualmin on an Ubuntu server. I need to migrate several websites from an old server to this new server. In the old server, all the websites are located in the /var/www/ directory, but in the new server, virtualmin saves them in /home/user/public_html.

I have found the option to change the default Apache virtual host configuration in Virtualmin. The current configuration looks like this:

ServerName ${DOM}
ServerAlias www.${DOM}
ServerAlias mail.${DOM}
DocumentRoot ${HOME}/public_html
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.php index.php4 index.php5 index.htm index.html
<Directory ${HOME}/public_html>
    Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch 
    Require all granted
    AllowOverride All
</Directory>
<Directory ${HOME}/cgi-bin>
    Require all granted
    AllowOverride All
</Directory>

My question is, can I simply change the

DocumentRoot ${HOME}/public_html line to DocumentRoot /var/www/${DOM}/public_html

in order to achieve the desired configuration? I want to make sure that the websites are served from the correct directory while keeping other files, by default, saved in the /home/user directory.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.