How to change virtual root from /home to /var/www/vhosts?

Hey all! I am working on migrating several domains and users from a dedicated server using Plesk to a less expensive solution. I have started trying out Webmin/Virtualmin as a replacement to plesk, and I have a few questions.

It would be way easier to migrate users websites and scripts over if I could keep them in the same directory structure.

In plesk the sites are in:

In virtualmin it looks lilke:

Is it possible to change this to match up? I assume the root dir /home will need to change somewhere to /var/www/vhosts, the vitual domain will need to change from “username” to “”.

It would also be good to make the users home dir /var/www/vhosts/ and the ability to restrich ssh access, ftp is ok.

So far I think those things would get me sailing right along! Thanks!

The home directory is configurable in the Webmin>System>Users and Groups module.

You’ll also need to switch back to the OS-standard Apache packages (which have suexec docroot set to /var).

Virtualmin thinks about things a little differently than Plesk, so there will still be differences.

The Plesk migration feature can import Plesk backups and set them up as Virtualmin virtual servers, so unless you know you specifically have a lot of things that expect homes to be in /var/www/blah/blah, I’d probably recommend you use that and leave Virtualmin configured to put homes in /home.

There are quite a few scripts in the domains that have full directory paths in them. The bigger bummer is some of the domains are other peoples, so I would have to “tweak” their domains too during the migration process. I also think combining ftp only users with full users on the box in /home seems a bit cluttered, but possibly for a good reason?

I want to go over the steps that I’ve changed in Virtualmin to accomplish what I wanted, but I want to make sure that there wont be any negative side effects. There is also one thing I still haven’t figured.

Virtualmin->System Settings->Module Config->Defaults for new Domains:
Home directory base: /var/www/vhosts (was /home)
Home subdirectory: $DOM (was Automatic which was the username)

Virtualmin->System Settings->Server Templates->Apache Config->Apache website:
Directives and Settings:
changed DocumentRoot from public_html to httpdocs
changed Directory from public_html to httpdocs
Users website subdirectory: httpdocs (was Default public_html)
Subdir for webstats: httpdocs/stats (was Default public_html/stats)

After the above changes I recreated my virtual domain and it did the following:
Created /var/www/vhosts/
Created html dir /var/www/vhosts/
Created username and locks users into /var/www/vhosts/
/var/www/vhosts/ is owned by username
No directory created in /home

That seems to be perfect, but are there any negative side effects from going this route that you can think of? The SuExec option that you mention was already in the Server Templates config and was already set to Yes.

Also, there is one option I have not been able to locate. Where can I uncheck a box to deny the user SSH access only? FTP is still fine.

So far I am loving what I see, and thanks for the ocnfiguration assistance!

under virtualmin - System Settings - Module Config - Actions upon server and user creation - there is an option called: Add users with no SSH access to deniedssh group? yes or no.

under virtualmin - System Settings - System Customization - Custom Shells you can set a default shell

under virtualmin - System Settings - Server Templates - click a server template - Go to Administration user - Initial Unix shell and choose the default shell for new users.

under webmin - System - Users and Groups - click Module Config on the top - browse through the options.
You’ll see under New user options - Build list of shells from and under New user defaults - Default shell for new users

Wow, so many ways to accomplish many things. This is really an amazing utility. I was unbeleivably impress on how it was able to install on my stock Ubuntu 8.04 server and configure everything with no errors!

I hope the regular “domain” user interface isn’t too complicated though. I’ll be checking it out this weekend.

Thanks for all the help so far guys!

yeah it’s great.

the regular user interface is the same as you see, just with less options of course.