virtualmin and MU-wordpress with suexec SOLVED (for now)

6 posts / 0 new
Last post
#1 Thu, 02/21/2013 - 09:25
edwardsmarkf

virtualmin and MU-wordpress with suexec SOLVED (for now)

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.

Tue, 02/26/2013 - 14:28
Joe
Joe's picture

Actually, we added full support for email addresses under Alias servers a few versions back, specifically for Drupal Multisite and Wordpress MU users!

When creating a new virtual server, simply click "Alias of virtualmin.com, with own email", and the new alias will have a whole new virtual domain setup within Postfix (and home directories), and can thus have its own mailboxes.

This option should be available in both Pro and GPL versions of Virtualmin starting somewhere around 3.95 or 3.96 (not sure exactly when it came in, but it's been a few months). I don't think it requires any configuration changes to make it show up, but if you're not seeing it, holler and we'll dig a bit deeper to get it figured out.

--

Check out the forum guidelines!

Tue, 02/26/2013 - 16:33
edwardsmarkf

hi joe -

i could not see the difference, and i posted it here:

http://www.virtualmin.com/node/25467

Virtualmin version 3.98.gpl GPL

Wed, 02/27/2013 - 19:04 (Reply to #3)
edwardsmarkf

eagerly waiting to see a better solution!

Wed, 02/27/2013 - 23:37
andreychek

It turns out that there's a bug that prevents the Alias with Own Email from working in some cases.. and it appears that bug is occurring on your system.

The workaround, until version 4.00 of Virtualmin comes out, is to run this command as root:

virtualmin enable-feature --domain domain.tld --dir

Where "domain.tld" is your alias domain.

-Eric

Thu, 02/28/2013 - 14:38
edwardsmarkf

thanks eric - although i was VERY PROUD of my workaround script.... ;-(

Topic locked