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.

MSM setup - is this correct?

June 01, 2008 6:58am

Subscribe [2]
  • #1 / Jun 01, 2008 6:58am

    imagi-nation

    60 posts

    I use MSM for the first time. What I need is to have site1 (first site) where I add the content, and site2 to display that content. I followed the documentation and I made a directory named “site2” where I copied the index.php and path.php.

    On the path.php I modified the $system_path to “../system/” to use the cp from site1.
    I added $site_name = “site2_short_name”.
    I also modified in Site2 > Admin › System Preferences › General Configuration the “URL to the root directory of your site” with http://site2.com/, leaving everything else untouched. The themes folder is not important right now. The CP index page is from site1, hope this is correct.

    When I want to access a template from site2, I receive the following

    To proceed to the URL you have requested, click the link below:
    <a href="http://site2.com/index.php/template_group/index/">http://site2.com/index.php/template_group/index/</a>

    and this is a loop.

    Can you tell me please what I did wrong with the MSM setup? Thank you.

  • #2 / Jun 01, 2008 10:25am

    Robin Sowell

    13255 posts

    I’m fuzzy on why you need msm if all of the content is going to be entered into site1 anyway.  But- ignoring that for the moment- did you create a template in site to- make it the default template group there.  Then just go put something like ‘Testing’ on the index page and see if it comes up?  It should- using http://site2.com/index.php/template_group/index/.  (I’m a little fuzzy on how it’s looping- you mean if you click the link you get another identical page saying that?  And if you just paste it directly into the browser- same deal?)

  • #3 / Jun 01, 2008 10:50am

    imagi-nation

    60 posts

    Sorry to not be clear, I’m in a big hurry.

    Site1 is the site where the content is added. The principal content are news and will be displayed (or not) on 4 sites with different audience target and using different criteria and different language. The unique site (site1) where the content is added is a special request from my client and i’m sure that MSM can handle this.

    The loop is like you said, the page that provide a link to himself.

    Now I have on site2 a template group “test” and the index page set to be default. This is the message I receive:

    Object not found!
    The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. 
    If you think this is a server error, please contact the webmaster. 
    Error 404
    localhost
    06/01/08 16:42:34
    Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5

    And this is the link that is rendered:

    <a href="http://localhost/site2/index.php?URL=http://localhost/site2/index.php/test/index/">http://localhost/site2/index.php?URL=http://localhost/site2/index.php/test/index/</a>

    If I access the page using a direct link , the error message is almost the same:

    Object not found!
    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. 
    If you think this is a server error, please contact the webmaster. 
    Error 404
    localhost
    06/01/08 16:42:30
    Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5

    The direct link:
    http://localhost/site2/index.php/test/index.php

  • #4 / Jun 01, 2008 10:56am

    Robin Sowell

    13255 posts

    What happens using http://localhost/site2/index.php/test/index/ - basically, the long link should end up redirecting to that.

  • #5 / Jun 01, 2008 11:08am

    imagi-nation

    60 posts

    Yes, but it don’t. This is the content of the path.php file. I changed only $system_path and $site_name, and in the Admin › System Preferences › General Configuration I put in URL to the root directory of your site the value http://localhost/site2/, leaving everything else unchanged (so the other values are the same as site1).

    Is there anything that need to be changed?

    <?php
    
    // ------------------------------------------------------
    // DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO
    
    // ------------------------------------------------------
    // Path to the directory containing your backend files
    
    $system_path = "../system/";
    $site_name = "site2";
    // ------------------------------------------------------
    // MANUALLY CONFIGURABLE VARIABLES
    // See user guide for more information
    // ------------------------------------------------------
    
    $template_group = "";
    $template = "";
    $site_url = "";
    $site_index = "";
    $site_404 = "";
    $global_vars = array(); // This array must be associative
    
    ?>
  • #6 / Jun 01, 2008 11:11am

    Robin Sowell

    13255 posts

    No- looks good to me.  If you put a plain html file in the new site, does it come up ok when you visit using the site2 url?

  • #7 / Jun 01, 2008 11:16am

    imagi-nation

    60 posts

    No. I made a file test.html inside the site2 directory. I receive the same error message. This is the link:

    http://localhost/site2/test.html

    Maybe the site2’s files are in the wrong place? I made a directory inside site1’s directory, at the same level as system, images and themes.

  • #8 / Jun 01, 2008 11:28am

    Robin Sowell

    13255 posts

    It’s sounding like something on the server side.  EE shouldn’t have any effect on an html file.  Make sure you don’t have any htaccess file in the subfolder making things weird.  But you have to have that second site properly resolving for EE to work.  If a plain html file throws an error when you go straight to it?  I think it’s time to call in your server guru.  But like I say- make sure you don’t have an htaccess file in there rewriting things.  And if you like, you could just remove the EE related files.  They shouldn’t matter a lick as far as that html file pulling up, but it won’t hurt to remove them and then put them back once the html file pulls up ok.

    Make sense?  I don’t think the main issue is EE at this point.

  • #9 / Jun 01, 2008 11:42am

    imagi-nation

    60 posts

    My setup is just for test, localhost based on XAMPP. I don’t have any .htaccess in the site1 folder or subfolders. And just to clarify, the html file is accesible in browser using this link:

    file://localhost/D:/XAMPP/htdocs/site1/site2/test.html

    Is not accesible from this link:

    http://localhost/site2/test.html

  • #10 / Jun 01, 2008 1:11pm

    Robin Sowell

    13255 posts

    OK, I suspect the setup needs to be tweaked.  But what happens if you try to pull up the template via file://localhost/D:/XAMPP/htdocs/site1/site2/index.php/test/site?  Though in truth?  I wouldn’t develop under that setup, because it seems confusing.  Still- if the url doesn’t work for an html file, it’s not likely to work for an EE template.

  • #11 / Jun 01, 2008 6:39pm

    imagi-nation

    60 posts

    I had a very busy day. I think that in last the 2 hours I deleted something in the site1 setup, but I don’t remember when. Not a problem, is just a test. I’ll be back when I’ll put everything back, if the problem remain.

    Thank you for your time.

  • #12 / Jun 02, 2008 8:55pm

    Sue Crocker

    26054 posts

    imagi-nation, any news on this?

  • #13 / Jun 03, 2008 5:27pm

    imagi-nation

    60 posts

    Thank you and I’m sorry, I’m very busy with something else. I’ll be back in a day or two.

  • #14 / Jun 03, 2008 5:35pm

    Sue Crocker

    26054 posts

    No problems on our end. Was just checking the status. 😊

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

ExpressionEngine News!

#eecms, #events, #releases