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 and Cpanel

October 24, 2009 4:02pm

Subscribe [3]
  • #1 / Oct 24, 2009 4:02pm

    This question may be related to a resolved thread.


    I’m migrating a client’s installation from a shared environment to a dedicated server. As their previous domain management was a complete mess (and after working for them for 5 years I’ve finally managed to get them to centralise everything), it’s never as easy as it should be.

    Anyway, the new server is using cPanel and WHM. The hosting providers are helping to migrate everything, but we’ve hit a snag in the testing phase.

    with MSM installed, we have 2 sites.

    Site 1: http://www.site1.com /home/user/public_html/
    Site 2: http://www.site2.com /home/user/public_html/sites/site2 as an “addon domain” in cPanel.

    Now, site 1 loads all fine and dandy, but as site 2 loads only its home page, and the template groups don’t work at all - they all just reload the home page when a link to them is followed.

    Also, on the old server I’d have to redirect requests for MSM sites using htaccess files (pushing them onto sites/site2 and then stripping that from the url). Weirdly, despite commenting out the code to do just that, typing in http://www.site2.com takes me straight to the site, even though it should just point to the root directory. If it points straight to the sites/site2 folder the same error happens.

    Anyway, does anyone have any ideas why it’d point to the right place, but act as if none of the template groups exists? Does this error actually make any sense?

    Thanks!

  • #2 / Oct 24, 2009 4:15pm

    Ingmar

    29245 posts

    What version and build of EE and the MSM are you using? Do you’ve got a link? Have you seen this article?

  • #3 / Oct 24, 2009 4:30pm

    1.6.7 and 1.1 for MSM I believe.

    I’ll take a looksee at the article.

    It’s a pain because we have 1 site on one server, and one site on another, which means I can’t amend site2 because resyncing the database would wipe any changes to site1. I want them all in the same place asap! (not least because it’s slightly breaking the license rules at the moment, but that’s unavoidable during the migration).

  • #4 / Oct 24, 2009 4:33pm

    Ingmar

    29245 posts

    If you are migrating your site anyway, I strongly recommend upgrading to 1.6.8 in the process. It’s a recommended security update.

    That said, do take a look at this article. Forcing query strings (or similar) might be all it takes.

  • #5 / Oct 24, 2009 4:50pm

    Unfortunately, forcing query strings appears to break the main site. As the main site appears to work perfectly, I’m not sure it can be a path_info problem (as I’ve checked the server supports it (http://www.newstartmag.co.uk/ info.php - (remove break) and it appears to).

    1.6.8 will come when I remember to update the renewal option!

  • #6 / Oct 24, 2009 4:53pm

    Ingmar

    29245 posts

    Are you removing index.php from your URL? Any other mod_rewrite stuff going on? Try turning it off for debugging, putting index.php back in again, as it were. Is newstartmag.co.uk the secondary site? It not, what URL does it have?

  • #7 / Oct 24, 2009 5:01pm

    newstartmag.co.uk is the primary site

    http://www.footsey.org.uk *is* the secondary site, but the moment I’ve had to reset the DNS to point at the original hosting as it’s also a live site.

    I’m going to see if the people at Heart can shed any light. When it comes to dedicated servers, it’s all a bit odd with them.

    Can we leave this open so I can update it later?

  • #8 / Oct 24, 2009 5:03pm

    Ingmar

    29245 posts

    But of course. Let us know when you’ve had some input and are ready to proceed.

  • #9 / Oct 24, 2009 5:49pm

    Right. Fixed it. I think…

    I’d shifted it onto a subdomain of http://www.newstartmag.co.uk - http://footsey.newstartmag.co.uk (needs hosts file change to reach - let me know if you’d like the IP) so I could test with the existing configuration.

    Query strings worked after a fashion - when I’d restored all the index.php refs in path.php and the system config, but because I’d used {homepage} and not {site_url} it was missing all the styling.

    Anyway, I returned it all to how it was when the error first occurred, and amended the .htaccess file to use the exclude method. Worked a treat.

    Looks like this:

    # secure .htaccess file
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    
    Options +FollowSymlinks
    # Remove index.php
    # Turn on URL rewriting 
    RewriteEngine On 
    # Installation directory 
    RewriteBase /
    # Allow these directories and files to be displayed directly: 
    # - index.php (DO NOT FORGET THIS!) 
    # - robots.txt 
    # - favicon.ico and any other physical folders
    RewriteRule ^(index.php|robots.txt|favicon.ico|themes|images|admin|css|files|downloads) - [PT,L] 
    # Rewrite all other URLs to index.php/URL 
    RewriteRule .* index.php?/$0 [PT,L,QSA]

    It’s something to with how these servers run php.

  • #10 / Oct 25, 2009 3:06pm

    Greg Salt

    3988 posts

    Hi dasgrafik,

    Glad to hear that you got it working ok. Please post back if you have further problems.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases