| 153 | Some groups request a dedicated virtual private servers. Unfortunately, you have to jump through a few hoops to get this done. |
| 154 | |
| 155 | Usually, the reason for the request is because the user wants to run CiviCRM or otherwise wants PHP to perform more efficiently than is possible with suExec. These directions assume that's the purpose of the MOSH: |
| 156 | |
| 157 | * In the puppet configuration, specify the following in the m_mosh call: |
| 158 | {{{ |
| 159 | php => "mod_php", |
| 160 | apache_user => "USERNAME", |
| 161 | apache_group => "GROUPNAME", |
| 162 | }}} |
| 163 | Here's an example of a real live config: |
| 164 | {{{ |
| 165 | class { "m_mosh": |
| 166 | php => "mod_php", |
| 167 | apache_user => "nybrecht", |
| 168 | apache_group => "brechtforum", |
| 169 | apache_max_clients => 40 |
| 170 | } |
| 171 | }}} |
| 172 | |
| 173 | Sadly, there's a chicken/egg problem. You can't know what the USERNAME and GROUPNAME will be until you've added a hosting order via the control panel. But, you can't add a hosting order via the control panel until you configured puppet. So, I suggest start by keeping the USERNAME/GROUPNAME place holders and tolerate puppet reporting an error (it will tell you that apache failed to start). |
| 174 | |
| 175 | Next, create a hosting order for the requesting member in the control panel. If you specified "accepting = 1" in the steps above, the server should be available (and hopefully no other member has decided to put a hosting order there). |
| 176 | |
| 177 | After you have created your hosting order, manually update the red_server table to change the accepting field to 0 so other members can't use it. |
| 178 | |
| 179 | Then, in the control panel, click on Top and then click the Server Access tab. Create a new record specify the member requesting the server, the server that you have added, and the user account that, when they login to the control panel, should have full access to the server. This probably will be the user account that was created in the previous step but it doesn't have to be (if they have hosting orders on other servers). |
| 180 | |
| 181 | Now, you can modify the puppet record for the server and replace the USERNAME and GROUPNAME with the user account that you created for the hosting order on this server. The username and groupname should be the same. |