ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Guide to set up MSM on Linux Server running Plesk 9

May 10, 2011 1:29pm

Subscribe [1]
  • #1 / May 10, 2011 1:29pm

    Adam Faux

    14 posts

    This article is a step-by-step guide of how to set up EE with MSM on a Linux server running Plesk 9 (This will also work for Mediatemple DV 3.0). This is for anyone who wishes to avoid possibly spending more than a week trawling through different articles and forums trying to get everything set up correctly, like I did 😊

    The end result of this article is that you will have set up MSM using separate domains, all running from your initial installation of EE.

    To get started follow the Multiple Site Manager’s installation instructions until you reach the Setup Domains and Sub-domains page.

    Step 1: After you have downloaded your index.php edit the following:

    <?php
    
    /*
     * --------------------------------------------------------------------
     *  SYSTEM PATH
     * --------------------------------------------------------------------
     *
     * The following variable contains the server path to your
     * ExpressionEngine "system" folder.  By default the folder is named
     * "system" but it can be renamed for increased security.  If you
     * have changed the name of the system folder please indicate the
     * new name here, and include the server path.  The path can be a
     * simple relative path or it can be a full server path.
     * 
     */
        $system_path = '/var/www/vhosts/yourdomain.com/httpdocs/your_system_folder/';

    and

    /**
     * If you are running the Multiple Site Manager, uncomment and assign the following variables 
     * See <a href="http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html">http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html</a>
     */
         $assign_to_config['site_name'] = 'your_site_shortname';
    //    $assign_to_config['cp_url'] = '';
    //    $assign_to_config['site_url'] = '';

    Once you’re finished editing your index.php upload it to your new domain in the httpdocs folder (web root folder)

    Step 2: Next you will need to shut off open_basedir and php safe_mode.

    You’re going to need root access to your server. In Plesk you can either log in as Root user or turn on shell access in the domain’s web hosting settings and log in just for that domain. For this guide we will log in as Root user, as you will need to change settings for both your new domain and your default domain (where you installed EE)

    Depending on which company you have set up your server with they should have or will be able to provide you with your root username and password.

    At this point you will need to log into your server via ssh. I will be using Terminal for Mac, for windows users use MS-Dos, although some commands such as ‘nano’ may be different. Open Terminal and run the following commands:

    ssh your.ip.address -l root

    You will then be prompted for your password. Note, as you type the password no characters will display, it will look like your typing nothing. Enter your password and hit return.

    Step 3: Once you’re logged into your server you’ll need to switch to the conf directory for the domain you wish to install your new site on.

    cd /var/www/vhosts/newdomain.com/conf/

    Step 4: Next you will next you will need create and edit a file named vhost.conf for your domain.

    touch vhost.conf

    Step 5: The touch command will create the file. You then need to open the file and edit it. Terminal uses nano. Windows users may use vi instead of nano.

    nano vhost.conf

    Copy and paste the following code into the file:

    <Directory "/var/www/vhosts/newdomain.com/httpdocs/">
    php_admin_value open_basedir none
    php_admin_value safe_mode off
    </Directory>

    When your finished editing, press ctrl+x, then y to save, then enter to confirm when prompted.

    Step 6: After exiting nano you’ll need to configure your server to read your new vhost.conf file on start up. First, enter cd to go back to root.

    cd

    Then enter one, or both of the following commands. I entered both to be sure.

    /usr/local/psa/admin/bin/websrvmng -a -v
    /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=newdomain.com

    Step 7: And finally you need to restart your apache web server.

    /etc/init.d/httpd restart

    And thats it, you are done. Your Plesk server should be configured to run your new site.  If you’re going to set up another site with your MSM you will need to repeat all of these steps for each new domain.

    Additional Option

    If you wish to use file manager within EE to manage the files for these domains, and you want files for the individual MSM sites stored within their own domain, you will need to apply steps 2 through 7 to the domain that EE is installed in. Without doing this you will get error messages when trying to upload files to folders on the individual MSM domains such as ‘file path not valid’ or something similar.

    So, I hope this helps someone, and saves you lots of stress filled hours!

    If there is anyone more experienced who can add to this or can think of an easier way, please comment. This article is based upon this incredible article which has helped me and tonnes of other people I imagine. Mine is a slight variant that adds the point of the file manager which I didn’t figure out first time round and made me abandon this method in search of others, but it turns out this one actually worked after all with a few tweaks. 😊

  • #2 / May 10, 2011 3:52pm

    Greg Aker

    6022 posts

    Awesome stuff, Adam!

    I’m going to drop this in a wiki entry.  Thanks for your contribution, and don’t hesitate to start a new thread if you run into any issues

    -greg

    ETA:  wiki entry is here:  http://expressionengine.com/wiki/Guide_to_set_up_MSM_on_Linux_Server_running_Plesk_9/

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases