We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    Is it possible to have multiple MODx sites running off the one core?
    There seems to be a config/config.ini.php in the core, which is DB/install specific. How could you have a core outside webroot that all the sites reference?

    Thaks in advance smiley
      • 11055 ☆ A M B ☆
      • 3,112 Posts
      I have not tried it at all, but some say that this is what context is for.
      http://rtfm.modx.com/display/revolution20/Contexts
        Rico
        Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
        MODx is great, but knowing how to use it well makes it perfect!

        www.virtudraft.com

        Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

        Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

        Maintainter/contributor of Babel

        Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        Mark Hamstra Reply #3, 15 years ago
        Yeah, contexts are the way to go. Every context is a site with its own site-specific context settings.

        Your sites will need to be hosted on the same server and in one way or another point to the root of the MODX install. Two options are listed under "See Also" header on the page goldsky linked to.

        Theoretically you could also run multiple MODX installs with one core (ie, one standalone manager for each install) by using different config keys during install, but I would simply opt for one install with multiple contexts.
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 22303 MODX Staff
          • 10,725 Posts
          This will be better supported in the future, as currently there is no config specific location (i.e. workspaces) for each configuration to store it's packages, components and other config-specific assets. For now it is used for quickly testing different versions and configurations, but the complications with upgrading packages for each config and the potential for overwriting config specific package versions, etc., do not make it suitable for production deployments at this time, unless you are willing to deal with those issues (i.e. each time you upgrade a package it will have to be upgraded on each configuration, etc.).
            • 15083
            • 697 Posts
            Have one small problem.
            I installed MODx to my testing server, but want to get it working locally now.
            I have updated the front/backend with a new core location on my local machine.
            I also changed the config in the core to recognise my local machine dir structure.

            Frontend of site working fine
            Backend:
            - Loads the login initially fine.
            - If I successfully log it it hangs loading on a white screen

            I have echoed the error down to this line in the index.php file:
            $modx->request->handleRequest();

            Thought it might be the connectors but the locations and patchs seem fine.
            Login cookie gets created and a new session in the DB.....just won't log in!!!
            Any ideas?? Many thanks smiley
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              Mark Hamstra Reply #6, 15 years ago
              Wait, so is MODX being run on an external server or a localhost now?
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 15083
                • 697 Posts
                Both smiley
                I'm running it on my test box and locally.
                I basically have a master config file that feeds the correct paths to the MODx configs, however the manager is not working locally!!!

                It's obvioulsy something small...but im a day at it now.
                I want to be able to move the files from one machine to the other and not have to update configs etc.
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  Mark Hamstra Reply #8, 15 years ago
                  How is PHP on the server going to access your local core though? "localhost" does not exist (or not in the way you see it) on your remote server...?

                  Or am I totally missing the point here?
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 15083
                    • 697 Posts
                    Good question, and I should have explained smiley
                    The MODx core is part of an dir that is included by defaul in my php.ini file on both machines.
                    So by making a "master" config I plan to be able to move my files between development, testing and production with no path changes.

                    Well at least thats the plan....apart from the problem I have now above!
                      • 15083
                      • 697 Posts
                      Also, If I deep link to a manager page,
                      The navigation loads but I get a blank manager, no resource tree and no action page.
                      Arg.....