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: Trying to create different CP login options for each site

October 15, 2010 4:43pm

Subscribe [2]
  • #1 / Oct 15, 2010 4:43pm

    *

    20 posts

    EE: 2.1.0
    Build: 20100810

    -
    Hello,

    I’m running three sites with MSM, my intention is to allow independent login for the second and third sites. For “site2” I have this inside it’s directory:

    admin.php:

    $system_path = ‘../renamed_system_file’;


    index.php:

    $system_path = ‘../renamed_system_file’;
    $assign_to_config[‘site_name’] = ‘site2’;
    $assign_to_config[‘cp_url’] = ‘http://www.site2.com/renamed_system_file.php’;


    If I go to www . site2 . com/renamed_system_file.php all I get is the “System Offline” template, but no CP login option.


    Thank you,

    Abraham

  • #2 / Oct 16, 2010 11:44am

    Sue Crocker

    26054 posts

    Abraham, if you turn the site on again, can you then reach the control panel for the second site?

  • #3 / Oct 16, 2010 11:52am

    *

    20 posts

    Hello Sue,

    If I turn the second site on I’m still getting the “System Offline” template for that site.

    -
    EDIT: One thing I have just noticed is that the “System Offline” template I see when I go to:

    www . site2 . com/renamed_system_file.php
    or
    www . site3 . com/renamed_system_file.php

    is in fact the “System Offline” template from the main site (also offline now).


    Thank you,

    Abraham

  • #4 / Oct 17, 2010 2:42pm

    Greg Salt

    3988 posts

    Hi Abraham,

    Is admin.php your renamed system/index.php file copied into the appropriate location for each new site? If so, you must make sure that you uncomment the MASKED_CP constant like so:

    /*
     * --------------------------------------------------------------------
     *  MASKED CP ACCESS
     * --------------------------------------------------------------------
     *
     * This lets the system know whether or not the control panel is being
     * accessed from a location outside the system folder
     * 
     * NOTE: If you set this, be sure that you set the $system_path and the 
     * 'cp_url' item in the $assign_to_config array below!
     * 
     */
        define('MASKED_CP', TRUE);

    In index.php the system path needs to be the path to your main system folder and not the path to the admin.php file for that site.

    Cheers

    Greg

  • #5 / Oct 17, 2010 4:24pm

    *

    20 posts

    Hi Greg,

    It seems that I copied the main index.php file, not the system/index.php. I have fixed that and now it’s working fine.


    Thank you,

    Abraham

  • #6 / Oct 17, 2010 4:41pm

    Greg Salt

    3988 posts

    Hi Abraham,

    Glad that we got this resolved. Please post back if required.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases