We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11149
    • 17 Posts
    Description of Problem:
    MODX Revolution Manager doesn't work on a different Domain. It loads but can't get into shape. (only plain text - no style-sheets...)
    (See attached picture for Screenshot)
    I used the instructions in the official MODX Hardening Tips.
    The Manager worked flawless in the original 'subfolder' constellation.

    Steps to Reproduce:
    I did set the required variables:
    The URL is a sub-domain of the domain I'd like to manage.
    $modx_manager_path= '/right_path_on_the_server/';
    $modx_manager_url= 'https://subdomain.domain.com/';

    Then I cleared 'core/cache/' and executed the 'setup update' again.

    Expected Outcome:
    MODX Manager works on a different domain.


    • MODX Version: 2.2.6-pl (advanced)
    • PHP Version: 5.2.13
    • Database (MySQL, SQL Server, etc) Version: MySQL-Client v5.0.77

    Any help would be much appreciated.
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      You can't run the manager from a separate sub-domain if I recall correctly, you can move/rename the core, connectors, and manager folders, but they all need to talk with each other for MODX to work properly.

      If someone else has gotten this working I would love to know how, as I have wanted to do it for some time now.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 39194
        • 149 Posts
        You have to move your connectors to manager folder. I tried to setup cross-domain requests(using session_cookie_domain and modifying connectors/index.php), but faced with such interesting problem: the "session expired" window appears, I press "login", it dissapears, but the modx sets "cookies expires" to "now" moment, so, any Manager http-request causes "session expired" window again...
          • 11149
          • 17 Posts
          @danya_postfactum
          I tried your suggestion.
          I moved the 'connectors' folder in the subdomain for the Manager as follows:
          $modx_connectors_path= '/right_path_on_the_server/connectors/';
          $modx_connectors_url= 'https://subdomain.domain.com/connectors/';

          There was a small improvement. As Resources and few icons are shown now. But still all is unformatted.
          (See attached picture for Screenshot)

          Do I see it right, that there is no working method to get the manager working on a different domain (in my case a sub-domain)?
            • 1343 ☆ A M B ☆
            • 2,213 Posts
            I asked on twitter, the response I got thus far:

            @mark_hamstra: @amdbuilder imo not worth the hassle, but theres a bug/feature request in tracker on that

            @christianseel: @amdbuilder I tried it some month ago, but it did not work at all.

            If it's a multi-context site you can host the manager on one domain, and run the site on a second, which may be an alternative for you. You just can't use a subdomain for now.
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting
              • 11149
              • 17 Posts
              @AMDbuilder
              Big thanks for the effort!
              Doesn't that means there are wrong information in the official Documentation?
              I quote:
              For an even more thorough solution, you could put the manager URL on a completely different domain, e.g. $modx_manager_url = 'http://othersite.com/r4nd0m/';
              If nobody got it working in this setup so far, I'd think there shouldn't be hint that it could work.
              Maybe somebody with access could change the phrase in question?

              To sad that its not working. :-/
                • 577
                • 132 Posts
                I am not sure if what I am doing follows your needs exactly but just to share. I have a single install with approx 100 context each context is a separate domain name. From each of these domain names you can log into /manager and it works. I do however take care of some stuff custom in apache before hitting MODX so that may play into it.

                Note: This manage is still running under 2.2.2 so not sure if maybe something has broken since then.
                  "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
                  • 39194
                  • 149 Posts
                  Hm, I got it working some time ago. The problem only is third-party components (by the way, all my extras place theirs assets into manager/components folders [but it causes some chmod issues]). I'll try it again and comment my attempt.
                    • 39194
                    • 149 Posts
                    Lets say we have following folder structure:

                    /home/
                         /core/
                         /manager/
                                 /connectors/
                                 /config.core.php
                                 /index.php
                         /www/
                             /assets/
                             /config.core.php
                             /index.php


                    we have http://example.org and want to get working http://manager.example.org. All you need is:
                    - disable compress_js and compress_css[/li]
                    - change /home/manager/config.core.php:
                    <?php
                    define('MODX_CONFIG_KEY', 'config');
                    
                    define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/core/');
                    
                    define('MODX_SITE_URL', 'http://example.org/');
                    
                    define('MODX_CONNECTORS_PATH', dirname(__FILE__) . '/connectors/');
                    define('MODX_CONNECTORS_URL', '/connectors/');
                    
                    define('MODX_MANAGER_PATH', dirname(__FILE__) . '/');
                    define('MODX_MANAGER_URL', '/');
                    
                    define('MODX_ASSETS_PATH', dirname(dirname(__FILE__)) . '/www/assets/');
                    define('MODX_ASSETS_URL', MODX_SITE_URL . 'assets/');
                    ?>

                    - change /home/manager/connecors/config.core.php:
                    <?php
                    define('MODX_CONFIG_KEY', 'config');
                    
                    define('MODX_CORE_PATH', dirname(dirname(dirname(__FILE__))) . '/core/');
                    define('MODX_MANAGER_PATH', dirname(dirname(__FILE__)));
                    define('MODX_MANAGER_URL', '/');
                    ?>
                    


                    You can just copy manager folder and controllers, so, both //manager.example.org and //example.org/manager will work (for debug).
                    Assets minifier will not work, due to a bug.

                    Extras will not work, we have to report this bug to their developers. [ed. note: danya_postfactum last edited this post 13 years, 9 months ago.]
                      • 11149
                      • 17 Posts
                      @danya_postfactum
                      Thanks for your tips.

                      What did you set the following values in the /core/config/config.inc.php in your example to?
                      define('MODX_CONNECTORS_URL', '???');
                      
                      define('MODX_MANAGER_URL', '???');