We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37165
    • 89 Posts
    I've built a few multi-site setups in the past. With all of these I had domain names on other servers. I pointed their A record to my IP address, set up alias's to catch them and then used context router in modx to take care of everything else. I'm having trouble with a current set up for two reasons. First this set up is on a subdomain. Secondly I don't have access to the domains yet. But I need a way to preview the site as I'm making it. Right now the main web context will preview normally, but when I preview any other page from another context I get a 404 error.

    Here is my set up:


    Revolution 2.4.0

    Main Context (this one works)
    key: web
    name:brand site
    Base URL: /
    http host: presbyterian.pointbdev.com
    site start: 1
    Site url:http://presbyterian.pointbdev.com/

    Secondary Site (this generates the links properly, but shows a 404 error for each)
    key: about
    name:about presbyterian
    Base URL: /
    http host: aboutpreshomes.pointbdev.com
    site start: 1
    Site url:http://aboutpreshomes.pointbdev.com/


    I tried creating a subdomain for aboutpreshomes.pointbdev.com and followed this tutorial http://www.belafontecode.com/how-to-host-multiple-sub-domains-on-modx-revolution/ . It worked initially but I ran into a ton of problems with base urls and menus. I don't want to move all my assets into that subfolder. I also don't want to change a ton of stuff with my template files just to suit this development period.

    My question is what is the easiest way to set up development links for a multi-site installation on a subdomain? Basically I just need to be able to preview all my resources without 404 errors.
      • 25803 ☆ A M B ☆
      • 721 Posts
      Maybe try XRouting?
        • 9266 ☆ A M B ☆
        • 77 Posts
        I had the same problem, just create sub domains on what ever domain you want and use Gateway Manager. You will be able to preview with ease, and when you are ready it takes about two minutes to change the domain or sub for that matter. You update the Context Http, base url, and site url. Then delete the configuration in gateway manger ( right click delete ) add new one. Should really only take two minutes to change and five to set.
          • 37165
          • 89 Posts
          Both good ideas, I ended up completely removing context Router and reinstalling it. Then it worked! So frustrating when the answer is so simple after trying so many more complicated solution