We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8245
    • 37 Posts
    Can anyone give me instructions on how I can install/configure Revolution (currently alpha 6) to manage multiple domains.
    this will be a core function requirement for my next project and I need to started testing ASAP..
    I would greatly appreciate any help that can be offered.

      • 3749
      • 24,544 Posts
      Quote from: DusX at Dec 27, 2008, 02:42 PM

      Can anyone give me instructions on how I can install/configure Revolution (currently alpha 6) to manage multiple domains.
      this will be a core function requirement for my next project and I need to started testing ASAP..
      I would greatly appreciate any help that can be offered.

      It’s doable and has been done, but unfortunately, there are no step-by-step instructions yet on how to do it that I’m aware of.

      The posts from OpenGeek in these threads are the closest thing I could find:

      http://modxcms.com/forums/index.php/topic,17370.0.html
      http://modxcms.com/forums/index.php/topic,25764.0.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 8245
        • 37 Posts
        thanks for the reply... not sure if you can answer any of my next questions but I gotta get them out wink

        I’m trying to figure out this whole context thing... think it may take me some time since I haven’t been working with modx for some time.
        I think that I prefer to have the index and related files in each sites root, and the manager up a directory..
        What would be advantages/disadvantages of the different methods of setting up multiple sites?
        how is the install done? Do you install in one sites root, then move everything up the directory... or am I way off?
          • 3749
          • 24,544 Posts
          Quote from: DusX at Dec 30, 2008, 02:57 PM

          thanks for the reply... not sure if you can answer any of my next questions but I gotta get them out wink

          I’m trying to figure out this whole context thing... think it may take me some time since I haven’t been working with modx for some time.
          I think that I prefer to have the index and related files in each sites root, and the manager up a directory..
          What would be advantages/disadvantages of the different methods of setting up multiple sites?
          how is the install done? Do you install in one sites root, then move everything up the directory... or am I way off?

          Good questions, but better answered by OpenGeek who knows infinitely more than I do about managing multiple Revolution sites.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: DusX at Dec 30, 2008, 02:57 PM

            I think that I prefer to have the index and related files in each sites root, and the manager up a directory..
            Are you talking about setting up one database and manager with multiple domains managed in that single database or each site has it’s own configuration (including it’s own database and manager)?

            Quote from: DusX at Dec 30, 2008, 02:57 PM
            What would be advantages/disadvantages of the different methods of setting up multiple sites?
            Well, I guess we’ll be learning that as we go, but it really depends on what your goals are, what is common between the domains, how the domains are configured, what’s to be shared vs. what’s not, and the access you have to the environment it’s being deployed in.

            Quote from: DusX at Dec 30, 2008, 02:57 PM

            how is the install done? Do you install in one sites root, then move everything up the directory... or am I way off?
            Completely depends on what you are doing. All of these scenarios need to be tried and tested and revised as experience dictates. At this time, there are no installation tools for any of them. As I mentioned in my previous discussions, my goal is to find folks who have specific scenarios they want to implement, work with them to meet their requirements, and then create specific distributions with custom setup code meant especially for specific multi-site configurations. Unfortunately, there are so many variables at the server administration level, it’s gonna be hard to come up with one solution that fits.
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              How would you go about setting up one manager instance and then 1 DB per context hosted in another location...

              So something like:

              Florida.domain.com (Remote DB)
              Georgia.domain.com (Local DB)
              Washington.domain.com (Local DB)
              domain.com/manager (Main Site + FL DB)

              domain.com and florida.dom.com are on the same server, but Georgia and Washington are on different servers.

              AMDbuilder
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting
                • 22303 MODX Staff
                • 10,725 Posts
                AMDBuilder:

                The MODx manager is intended to manage a single instance of a MODx database. Revolution allows a single core to run any number of configurations, each with it’s own config file with database connection information and path locations. Then, within each database, you can divide the Resources (i.e. pages or documents) into specific contexts, which could represent unique domains, subdomains, or just subdirectories within a domain served by their own gateway (i.e. index.php) or switched via plugin using a single gateway.

                Your scenario would best be served by setting up a single core in a shared location, then running setup on the main domain to establish the database and extract the gateway, connectors and manager directories that will be needed there. Once that is done you can now decide whether to create each subdomain as a unique virtual host with it’s own document root (where you would copy the index.php and config.core.php files from the main site, changing the name of the context it will be serving in the index.php) OR serve them all from the main gateway, switching contexts with a plugin based on the requested http_host.

                Again, once we establish some common scenarios, we will be developing custom setup processes for these configurations so the manual steps can be avoided in most situations, but for now, you’ll have to get your hands a little dirty. Here’s some steps to help clarify what to do:

                [*] get a local copy of Revo and run the build so you have a fresh core.transport.zip in your core/packages/ directory
                [*] checkout/export/upload just the core/ directory to a shared location that your PHP process will have permission to read (and write in specified directories); this location should optimally be outside of any directories being served by the web server.
                [*] upload the core.transport.zip into your core/packages/ directory if you checkout/export the core directly on the server
                [*] export the setup/ directory into the directory serving requests for the main domain (where you want the manager to be installed)
                [*] edit the setup/includes/core.config.php with the absolute file path to your MODX_CORE_PATH directory (i.e. /home/jason/revo/ might be where I keep my Revo core) and a MODX_CONFIG_KEY (I generally make this match the main domain being served by the configuration) if you plain on running more than one Revo configuration from the core
                [*] make sure your PHP process has permission to write files and directories in the MODX_BASE_PATH during setup (i.e. the location where you want the main gateway or index.php)
                [*] run setup from your main domain and then choose a method to incorporate the additional contexts

                From there, if you need connections to individual databases for each subdomain’s custom data, you can use xPDO (which MODx extends and thus is an instance of) to get connections to those databases through snippets that are context-aware, or even use whatever preferred method you want to work with your custom data. I just prefer the efficiency and consistency of working with xPDO objects in all my code, versus dealing with a lot of straight SQL.

                Hope that helps get you started...
                  • 8245
                  • 37 Posts
                  I want to manage a number of sites domain1.com and domain2.com
                  one database and manager with multiple domains managed in that single database
                  I am hoping this config will allow me to add new site domains as my needs arise.
                  what limitations are there for using the single database, If any? (will the single database cause speed issues?)
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: DusX at Jan 01, 2009, 08:16 PM

                    I want to manage a number of sites domain1.com and domain2.com
                    one database and manager with multiple domains managed in that single database
                    I am hoping this config will allow me to add new site domains as my needs arise.
                    what limitations are there for using the single database, If any? (will the single database cause speed issues?)
                    Yes, you need to organize things to be efficient based on how many domains you plan to manage. Using a single manager and single database to manage all those domains would a) expose all of the users, resources, and elements to each other in the manager, b) require increasingly complex security models to be able to isolate the records by context, and c) become decreasingly efficient as the number of records in the MODx repository increased.

                    I would use a single core and simply create a database configuration and manager for each domain. In this way, you share only the core files and each domain has their own database.
                      • 33992 ☆ A M B ☆
                      • 455 Posts
                      Quote from: OpenGeek at Dec 31, 2008, 01:01 PM

                      From there, if you need connections to individual databases for each subdomain’s custom data, you can use xPDO (which MODx extends and thus is an instance of) to get connections to those databases through snippets that are context-aware, or even use whatever preferred method you want to work with your custom data. I just prefer the efficiency and consistency of working with xPDO objects in all my code, versus dealing with a lot of straight SQL.

                      Would you give me an example of codes for connecting to a remote database?
                        God loves me. 【ツ】


                        MODX.ir (Persian Support)

                        Boplo.ir/modx/ (Persian)