changing virtual-server Home directory

15 posts / 0 new
Last post
#1 Mon, 01/07/2013 - 16:43
edwardsmarkf

changing virtual-server Home directory

hello all -

a couple of my first virtual-servers didn't have the domain-name suffix in the home directory (the default is changed now thanks to forum help....!)

so, being the brilliant newbie that i am, i simply renamed the home file (example)

mv /home/ilovevirtualmin /home/ilovevirtualmin.com ;

and then i manually edited the httpd.conf file and restarted apache.

however, my virtualmin page still shows the old file location (attached)

any ideas? (other than to simply ignore it, and to keep newbies away)

Wed, 01/16/2013 - 11:36
edwardsmarkf

can this even be done using virtualmin? i need to make a few changes.

Wed, 01/16/2013 - 12:23
tpnsolutions
tpnsolutions's picture

Hi,

Yes, this can definitely be done. The area where it gets done can be easily confused, because it's not as obvious given it part of a larger feature inside Virtualmin. Here are the steps.

Navigate to: Virtualmin > Server Configuration > Change Domain Name

For your needs, adjust "Change home directory" parameter to what you desire, then simply click "Rename Now".

*** This will create the new home directory, and move things to that directory, and finally delete the old home directory accordingly. ***

-Peter

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Wed, 01/16/2013 - 13:32
edwardsmarkf

awww - i should have known it had a simple answer! thank you peter!

Tue, 04/03/2018 - 16:57 (Reply to #4)
tpnsolutions
tpnsolutions's picture

@edwardsmarkf,

I'm glad my tip was able to help you :-)

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Fri, 03/24/2017 - 08:40
time2

Changing home directory and domain name is two different things but as always virtualmin help = no help

Tue, 04/03/2018 - 16:54 (Reply to #6)
tpnsolutions
tpnsolutions's picture

@times,

Please refrain from posting negative comments that are not aimed at helping users. You are entitled to your opinion, but making statements like "as always virtualmin help = no help" is not contributing to the posters question. The Virtualmin team does it's best to help all users, regardless of whether they are using a GPL or Pro version, however we also encourage users to help one another, as there's lots of questions and few of us.

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Fri, 03/24/2017 - 08:41
time2

There should be a change you can do it by follow the steps for activating virtual hosts you can find for the linux version you are using by searching google

Wed, 03/14/2018 - 16:49
jfolpf

Hi, when I tried to do that it says that directory already existed. I'm trying to import a Virtual Server from an existing nginx Virtual Server on /var/www/mydomain.com

how does it work?

Tue, 04/03/2018 - 16:56
tpnsolutions
tpnsolutions's picture

@jfolph,

Typically using the instructions I originally posted will result in a resolution, however there may be some quirks with regards to nGinx specifically. If you'd like, I am available to discuss the matter further over Skype. Drop me a line, and we can setup a time and day to look into this further. Cheers!

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Tue, 11/13/2018 - 05:03
sky

This isn't off-topic i hope as it's along the same lines.

Is it possible to force a home directory change to an existing virtual server's home directory? Virtualmin doesn't allow this stating the directory already exists, but this is needed to make use of OpenCart's multi-store feature. I've been able to do this on CPanel/Plesk - just having difficulty doing this on Virtualmin, or am i missing something??

Tue, 11/20/2018 - 03:41
LeoSilver

@sky

Looking for exact same thing!

Fri, 06/21/2019 - 06:02
sapmin

Hey @sky and @LeoSilver, I see this is old but with no answer posted I thought I'd take the chance to contribute.

When you create a new Virtual Server, you have the option of "Alias of yourdomain.com

I use TYPO3 with multiple domains in one instance. Similar to what you want to do with OpenCart.

KC

Sun, 10/13/2019 - 13:59
Chaosnature

Here it is: After hours of searching and playing experimenting with Vmin, i finally figured it out. for my setup its a little unique and this makes it not a straight forward setup as normal i am running Ubunto 18, Nginx and Apache running with Vmin installed to manage both (nginx and apache2)

  1. Virtualmin >> System Settings >> Server Templates >> >> Defualt Settings (Notice Under 'Skeleton Direcory' >> /etc/skel)

  2. From the drop down select Home directory again notice '/etc/skel' run SSH and type cd /etc/skel then ls (you should find something like:examples.desktop) you can open and view content using nano examples.desktop >> i did and the content seem like latin to me and i do not understand latin....but anyways next step...... Make no changes in step 2, this is just for information purpose

  3. do : a. /etc/apache2/suexec then b. ls on that and you will find : www-data

  4. nano www-data i had : /home puplic_html

i changed it to : /var/www/html html

  1. navigate back to : Virtualmin >> System Settings >> Server Templates >> >> Defualt Settings select 'Apache Website' drop down and change:

DocumentRoot ${HOME} to DocumentRoot ${HOME}/html and to

by doing this i have changed my default directory from /home to /var/www/html

home is a variable that is equal to /var/www if you know what i mean.......

Other problem i was having was nginx 'site creating' by virtualmin was writing and updating port "liston:80" into my ports.conf configuration which breaks my setup and stop apache or nginx working.... i remedied this by setting any port other than 80 or 443 (on the apache server setttings) which is reserved for the nginx server which proxies to apache server:8080

Ps: always check these when playing with you setup a. /etc/apache2/sites-available/creative.ctechn.com.conf (find document and directory settings here : whats written into it by Virtualmin) b. ports.conf (if any ports have been recently entered in by virtualmin breaking config)

c. then tersting using: apache2 -t and nginx -t (to make sure you have an ok on all settings configurations)

Chaos and nature = Living

Sun, 10/13/2019 - 16:55
Chaosnature

.......................................CORRECTION to the Above .................

---------------------------------------Changing Home website Directory----------------------------

1.

Virtualmin >> System Settings >> Server Templates >> >> Defualt Settings (Notice Under 'Skeleton Direcory' >> /etc/skel)

do : a. /etc/apache2/suexec then b. ls on that and you will find : www-data

nano www-data i had : /home puplic_html

i changed it to : /var/www/html html

navigate back to : Virtualmin >> System Settings >> Server Templates >> >> Defualt Settings select 'Apache Website' drop down and change: DocumentRoot ${HOME} to DocumentRoot ${HOME}/${ALIAS} and to

by doing this i have changed my default directory from /home to /var/www/html

#Directives and settings for new websites 2. ..................................................................................(OLD)

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.html index.htm index.php index.php4 index.php5 Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch

TO (/var/www/<DomainAlias>)

.....................................................................................................................................(NEW)

ServerName ${DOM} ServerAlias www.${DOM} ServerAlias mail.${DOM} DocumentRoot ${HOME}/${ALIAS} ErrorLog /var/log/virtualmin/${DOM}_error_log CustomLog /var/log/virtualmin/${DOM}_access_log combined ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch

Chaos and nature = Living