Best way to change the virtual servers home directory parent from /home to /apps (custom suexec root directory)

Hi there,

I would like to change the directory in which virtual server's home directories are stored from /home to /apps. This is so I can mount an nfs drive to /apps and store the apps home directories on that.

I do not want to mount the nfs drive to /home because this would affect some users which are not virtual servers and could create problems with accessing these users if there was a problem with mounting the nfs drive.

It seems this is entirely possible but the main problem is that suexec is configured to use the /home dir.

I have seen a number of issues on here similar to this but they are all very old and suggest manually recompiling apache2, with a build flag to set the custom suexec root dir. As also outlined nicely here (for ubuntu): http://serverfault.com/a/402426

However, it seems there is now a better way to do this, avoiding recompiling apache2, by using the apache2-suexec-custom package. Can this work with virtualmin? If so how?

Status: 
Active

Comments

Howdy -- just to clarify, which distro is it that you're using there?

Okay, that should work.

I don't normally recommend that, as it's a easier to run into issues when not using /home.

However, it should indeed work, and if you do run into any issues just let us know so we can get them fixed up.

On Ubuntu/Debian, Virtualmin does indeed use the apache2-suexec-custom package.

And with that -- you can change the suexec path pretty easily by editing "/etc/apache2/suexec/www-data", and in there change the first line to be "/apps" rather than "/home".