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 Home Directory on the new forum.
I have installed virualmin on to webmin created virtual hosts and noticed that they are put into the home directory. I have now added a second harddrive with a directory called hosts, how can do I make virtualmin use the hosts directory by default when creating new virtual hosts. I always prefer to use a seperate harddrive the OS and WEBSITES
Howdy,
Well, Virtualmin uses suexec to call PHP and friends, and it's generally hardcoded in the suexec Virtualmin provides to use /home for executing files. It tends to be a lot simpler to go with /home for all your files if you can :-)
Would it be possible to mount your second hard drive on /home?
-Eric
Hmmm... Sorry, but - Eric, I think your comment might be potentially "dangerous", in light of the fact that VMin offers the option to change the base directory where it creates its user homes. :)
Check out System Settings -> Virtualmin Configuration -> Defaults for new domains : Home directory base. If it constitutes an suexec-related problem to enter something else than "/home" there, I think the documentation should contain a definitive warning about that. Currently, it reads:
in light of the fact that VMin offers the option to change the base directory where it creates its user homes.
Well, while Virtualmin does indeed offer the ability to change where home directories are generated -- changing that doesn't actually update suexec.
The suexec binary on distros such as CentOS is hard coded to only allow programs to run from /home.
So if you change the Virtualmin setting away from /home, suexec stops working. And then CGI and FCGID generate 500 errors on every request, it gets messy fast! :-)
That said, newer versions of Debian and Ubuntu have begun removing the hard coded nature of that setting, and instead allow it to be configured from the "/etc/apache2/suexec/www-data" config file.
So if Ubuntu or Debian users with that config file wish to move where Virtualmin puts web files, it's a lot simpler than for CentOS users.
There's some documentation on the website that goes into a lot of that (I think, I can't seem to find it ATM), though if it doesn't say that in the Virtualmin documentation itself, I suppose it should, I'll ask Jamie to pop that in there :-)
-Eric
Yep, indeed
/etc/apache2/suexec/www-data
exists in my Ubuntu 10.04, with the intended content. I agree about putting info about that in the documentation. I would sure have fallen for that, had I tried to move the homes elsewhere. :)Thanks for all of your help. New to Linux got fedup with the windows box