We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37957
    • 2 Posts
    MODX 2.1.5
    Apache 2.2.21
    PHP 5.3.7
    MySQL 5.5.15

    I'm trying to launch a multi-site setup. Up front I'd like to state that I'm pretty confident that MODX can be made to work this way and I'm pretty committed to the product. I just need some help with deeper aspects of this implementation that I'm just not finding quickly enough. To start, I referenced the tutorial on Aaron Baxter's site:

    http://www.belafontecode.com/modx-revolution-hosting-multiple-domains/


    This is a pretty straightforward implementation. It works...to an extent. Right now, I'm having a problem with things always defaulting to the "web" context. For instance, the tinyMCE components default to the web context's assets directory. This is obviously not wrong, because this is where they were installed. However, I don't jive with the idea that the editor for "somesite" is referencing components from the "web" site. My question? huh Is this unavoidable, or could/should multi-site setup include duplication of components into each site's webroot (e.g. /somesite/assets/components)? And how could this be accomplished using the context settings within the manager?

    Also, if I could check with folks...one other issue I had was properly addressing my templates on a server behind a reverse proxy and because my site urls aren't at the top level of the webroot. I ended up having to create a snippet to resolve them within the template. Something like this but a little more involved:

    $host = $_SERVER['HTTP_HOST'];
    if ($modx->getOption('http_host') != $host)
       echo $host;
    else
       echo '[[++site_url]]';


    Is there another way around this? Did I miss something?

    And at the risk of being alienated...I'll throw in one last question...

    I got a copy of Bob Ray's MODX guide last month after committing to the multi-site setup for MODX. He really discourages this type of setup (with multiple contexts) and that is really nagging my brain right now. Is this a feature that the MODX team isn't really encouraging - contrary to the claim that MODX is a multi-site system? I'd like to know if I should turn back now...before it's too late! smiley [ed. note: navigator last edited this post 14 years, 10 months ago.]