hello all -
i have had a difficult time getting virtualmin to play nicely with multi-user wordpress.
the problem is that where the wonderful virtualmin “alias” option would normally be perfect, i wanted to be able to have total flexibility regarding email.
in other words, i want to be able to offer users the option to choose ANY email prefix, so everybody could choose “info@” for an email prefix if they wanted to, and to have as many email addresses as they wanted.
also, i wanted to take advantage of the security of suexec.
i choose cgi-wrapper as my php execution mode after reading a few stories about wordpress gobbling up resources. but this should work in either mode.
here are the steps i went through. parent.com is the example name of the mothership, and child.com is the example name of the wordpress user site.
1 - create new virtual-server
2 - go into server-configuration–>website-options, and check/reset php-script-execution-mode as desired.
3 - run ‘id parent.com’ and note the group id number.
4 - manually edit your httpd.conf file. jump to the bottom of the file and change your SuexecUserGroup. it will look like this:
SuexecUserGroup “#628” “#537”
you will be changing the LAST number (537) to match the number from the previous step
5 - associate the new domain with the parents group:
usermod -g parent.com child.com ;
6 - rename public_html to public_htmlRENAMED (or just delete it)
7 - create a symbolic link to the mothership:
ln --symbolic --verbose /home/parent.com/public_html /home/child.com/public_html ;
the --verbose is optional but its still fun to watch it happen
8 - open up the fast-cgi files to be changed:
chattr -i /home/child.com/cgi-bin/php5.cgi /home/child.com/fcgi-bin/php5.fcgi ;
9 - globally change the directory ownership
chown -R child.com:parent.com /home/child.com ;
10 - reset the fast-cgi files:
chattr +i /home/child.com/cgi-bin/php5.cgi /home/child.com/fcgi-bin/php5.fcgi ;
11 - restart apache
i hope these steps help somebody else from struggling ! there is probably a better way and this list can be updated as needed.
i created a simple script to do most of the work since i plan on doing this regularly and will be happy to share it with anybody.