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.

Adding new site with Multiple Site Manager

September 19, 2011 7:41pm

Subscribe [4]
  • #1 / Sep 19, 2011 7:41pm

    Hi all,

    I’ve already got a single EE site running and am trying to add another to it via the MSM. MSM is installed, and I’m following the instructions here: http://ellislab.com/expressionengine/user-guide/cp/sites/createsite.html

    I’ve reached the ‘setup domains and sub-domains’ part (http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html) but this is where I’m stuck - “Create the domain or subdomain using your webhost’s tools”. I’m running vhosts on an ubuntu 10.04 installation, on rackspace cloud servers, and I thought that part of the point of the MSM was that the alternate domain ran out of the same installation as the primary domain.

    I’ve got the system folder at the same level as the httpdocs (as was recommended), but I just can’t see how my directory structure relates to that of the example of step 2 here - http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html - or what to do next.

    Thanks in advance for your help - much appreciated!

  • #2 / Sep 20, 2011 10:57am

    Kevin Smith

    4784 posts

    Hi all,

    I’ve already got a single EE site running and am trying to add another to it via the MSM. MSM is installed, and I’m following the instructions here: http://ellislab.com/expressionengine/user-guide/cp/sites/createsite.html

    I’ve reached the ‘setup domains and sub-domains’ part (http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html) but this is where I’m stuck - “Create the domain or subdomain using your webhost’s tools”. I’m running vhosts on an ubuntu 10.04 installation, on rackspace cloud servers, and I thought that part of the point of the MSM was that the alternate domain ran out of the same installation as the primary domain.

    It is, that’s true. This step means that you need to work with your host to set up a new virtualhost entry that tells the web server what to do with requests for that domain name and where the web root for that virtualhost entry is located. Within that web root, you’ll put your admin.php and index.php files.

    So, for example, let’s say you want to add a second site called “example2.com”. Working with your host, you’ll add that domain to your account, with the web root in a folder called “example2” that is located in the same directory as the folder that is the web root for your main site. Your web server will send a request for example2.com to this web root, index.php will be called into action, and EE will take over from there.

    I’ve got the system folder at the same level as the httpdocs (as was recommended), but I just can’t see how my directory structure relates to that of the example of step 2 here - http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html - or what to do next.

    Thanks in advance for your help - much appreciated!

    Does that explanation clear things up at all? Setting up MSM can be a little confusing just because of that first step in “Setup Domains and Sub-domains”. It can be such a different process from host to host.

  • #3 / Sep 20, 2011 11:21am

    Hi Kevin,

    Thanks so much for your reply. I actually manage the server myself, so I can add another vhost entry quite easily. - I just didn’t realise I’d need to do this. I will try this out now and report back on my success.

    Thanks again!

  • #4 / Sep 20, 2011 2:00pm

    Kevin Smith

    4784 posts

    Great! Post back once you’ve got an update for us!

  • #5 / Sep 22, 2011 11:00am

    Hi again Kevin,

    I’ve set up the new domain within vhosts, uploaded and configured the index.php and update.php (renamed from admin.php) to httpdocs as mentioned in the guide. However, when I go to domain2, all I see is the domain1’s site.

    index.php on domain2 looks like this (the crucial bits, with real domain replaced):

    $system_path = '/var/www/vhosts/domain1.com/system'; 
    
    $assign_to_config['site_name'] = 'domain2_shortname';
    $assign_to_config['cp_url'] = 'http://domain2.com/update.php';
    $assign_to_config['site_url'] = 'http://domain2.com';

    ...and update.php on domain2 like this:

    $system_path = "/var/www/vhosts/domain1.com/system";
    $assign_to_config['cp_url'] = 'http://domain2.com/update.php';

    Admin->General Configuration in domain2’s control panel looks like this:

    Name of your site’s index page: index.php
    URL to the root directory of your site: http://www.domain2.com/
    URL to your “themes” folder: http://www.domain2.com/themes/
    Theme Folder Path: /var/www/vhosts/domain2.com/httpdocs/themes/

    I’m not really sure where to go with this now. Does the above look correct to you?

    Thanks again for your help.

  • #6 / Sep 22, 2011 3:48pm

    Kevin Smith

    4784 posts

    Looks good as far as I can tell, but let’s try getting EE out of the way first.

    In the web root of domain2.com, place an index.php file (you may need to backup your existing one) that contains just the following:

    <?php
        echo 'This is a test page.';
    ?>

    Now when you point your browser to domain2.com, does “This is a test page.” come up? If not, you’ll need to work on your server until it does come up and then try EE again. If it does come up, then the issue is on the EE side of things, and we’ll go from there.

  • #7 / Sep 26, 2011 6:38am

    It seems a typo in my server config was causing the other site to appear - fixed, ran the test php you suggested (which worked fine), but when I revert to the proper index.php file, it outputs nothing at all! Any ideas?

    Thanks for your continued help.

  • #8 / Sep 27, 2011 2:06am

    John Henry Donovan

    12339 posts

    Hi electricinteractive,

    but when I revert to the proper index.php file, it outputs nothing at all! Any ideas?

    Do you have anything in your templates for the second site yet?
    Login to your control panel and switch to the second site. Goto Design -> Template Manager. Do you have any template groups set up?

  • #9 / Oct 03, 2011 5:36pm

    Hi John,

    I’d stupidly left the main index template empty (!), despite adding all of the channels and other templates… So, after sorting this out, the homepage of domain2 appears as it should - almost.

    However, now I have some slight path issues: where are images, javascript files etc meant to be stored for domain2? I can’t seem to find any documentation on this, so I’ve tried a couple of different methods to no avail:

    - Storing static imagery for domain2 in domain2/httpdocs/images/ - which gives a 403 Forbidden error
    - Storing static imagery for domain2 in domain1/httpdocs/images/templates/domain2/ - which I can only reference using absolute paths (not ideal)

    Which is the best way to go about this? Is this something to do with my admin->general configuration settings in domain2?

    Thanks again!

  • #10 / Oct 04, 2011 6:56am

    Can anyone help me with this, please? I’m really struggling :(

  • #11 / Oct 04, 2011 11:59pm

    Dan Decker

    7338 posts

    electricinteractive,

    What you tried here is perfectly acceptable and not out of the ordinary.

    - Storing static imagery for domain2 in domain2/httpdocs/images/ - which gives a 403 Forbidden error

    To me this indicates improper ownership on your images directory. Can you check that the owner is set properly and that world has read access?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases