Posted by SoCalCreations on July 1, 2010 at 7:25pm
I need some quick help from the group....regarding multi-site setup.
Basically I want to run a copy of an existing site, but have it use its own mailchimp form.
So here is the example. I built this site http://www.myreisystem.com and I want to create a sub-domains of this site as in
http://user1.myreisystem.com
http://user2.myreisystem.com
http://user3.myreisystem.com
etc...
Each site would have it's own mailchimp form module to act with that users mailchimp account.
I hope that is a simple run down, so if someone can explain to me how I can set this up I would be very grateful.
Thanks
William

Comments
It doesn't sound like you
It doesn't sound like you want a multi-site setup so much as you want a single site which can use the domain name as a parameter to alter the functionality of a small subset of your pages.
I think your first step is going to be at the DNS level; configuring the name server for your domain name using the wildcard (*) so that any domain name prefix is valid for your domain name and will access your web server's IP address.
Showing a different MailChimp form depending on the domain name would probably take a bit of custom module development, but if I didn't lose you entirely on the previous line, you can probably figure it out.
The Boise Drupal Guy!
If each one has their own settings.php...
If each subdomain has their own settings.php, and their own database, they should have their own mailchimp settings. (After the multi-site DNS stuff is setup like Garret mentioned)
HTH
Rich Yumul
Sage Tree Solutions
www.sagetree.net
Garrett, No, I have seen
Garrett,
No, I have seen people use a multi-site that runs different modules per each domain. Setting up the domain is not my issue, that is easy.
I am more curious about how to set up a multi-site so that it can use the same core files, but each one (domain) use a separate module (mail-chimp). If this is not a possibility then it is possible I don't understand the point of multi-site Drupal installs.
Rich,
That is a logical conclusion, one which I believe works on the premise of what a Drupal multi-site install does, or am I incorrect?
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
Yes, each site in a
Yes, each site in a multi-site installation can use different modules and configuration settings, but is that really what you want to do here? Do you really want to have a separate site, with a separate database, for each user, or just a single site with a single database which just shows a different form depending on what subdomain is being used to access it?
You say you want to use a "separate module," but it sounds like you actually want to use the same Mailchimp module across all "sites," correct?
The Boise Drupal Guy!
Drupal natively supports the
Drupal natively supports the ability to have multiple domains use the same core files while also giving individual domains access to their own modules. The sites/all directory will give all domains access to modules, themes, etc. located there but to allow certain domains access to their own modules for example just setup a modules in your sites/your-domain.com/ directory.
I think the big different with something like the domain access module (for mult-site capabilities beyond drupal's native support) is to allow the admin to dynamically control and add domains in the admin inrerface and also allows users + data to be shared among the domains, vs manually setting it up each time and having no sharing going on. http://drupal.org/project/domain
Garrett, I would prefer, just
Garrett,
I would prefer, just one database to work with, much easier for upgrades...then again a catastrophe if the upgrade chokes :)
I want to have a multi-site so that each mail-chimp module deals with its own data from its own site. I am not sure if this is possible or not. It seems that the Domain Access module will do this.
Bestrank,
Are you familiar with using the Domain Access Module? It seems like this is exactly what I want to do. I can run all the sites off the base core Drupal install and have a separate module folder for each domain, where the mail-chimp module would be. It also seems to handle the issue of database tables for anything each subdomains mail-chimp module needs to write.
Okay I will give this a shot....so expect more questions :) And thanks alot!!!
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
Yea, domain access will let
Yea, domain access will let you specify which tables should be shared and which should not between domains
If you want separate modules
If you want separate modules per site, you cannot use Domain Access. But again, I don't think you really want separate modules per site; you just seem to think you do (a different copy of the Mailchimp module per site), am I right? Why do you think you need separate copies of the same module?
But I don't think you want to use Domain Access either, because it sounds like you just need a small fragment of your site to change depending on the domain name, right? Not the whole thing?
The Boise Drupal Guy!
Okay I read through the
Okay I read through the Readme.txt and now I am following the quickstart.txt.
I am at the part where it say enable the module, which means I have already altered my settings.php file....
Yet I keep seeing this message on every admin page
"Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration."
........er...nevermind, the postion in the settings.php file is crucial :)
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
Hey Bestrank, In Drupal
Hey Bestrank,
In Drupal (assuming domain is www.example.com)
I have created a Domain record "user1.example.com"
Now for my Hosting company I can setup Sub-domains, meaning I can name it "user1.example.com", should this point to the main folder on my hosting server for my root Drupal install for "www.example.com"?
ANSWERED my own question...YIPPERS!!!!
That works!!!
So now I have
www.myreisystem.com
and
pete.myreisystem.com
Both domains have separate Titles of the site and seem to function perfectly.
Now the big question....getting new tables for mail-chimp module to work for each domain....
BTW...this is SO COOL!!!
Okay I am sort of stuck...
I have enabled the following Domain Access modules
-Domain Configuration
-Domain Content
-Domain Prefix
-Domain Settings
-Domain Source
-Domain Theme
From what I read, these are the modules that need to be on in order to have separate database tables for the Mail-Chimp module. Okay Domain Theme isn't but I will offer a few different themes for the fun of it :)
Any ideas as to how to create new tables for the Mail-Chimp module and get them separately working for each domain?
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
I think what you want to do
I think what you want to do is share the Mail-chimp module code among your subdomains (so that would go in sites/all/modules) but have separate tables per host so that each host gets it's own set of data. In the domain access settings, if I remember correctly, there is a screen that lets you decide which tables should be shared.
OH MAN this SO ROCKS!!!! Okay
OH MAN this SO ROCKS!!!!
Okay so after enabling those modules for Domain Access, the module Mail-Chimp now has a new setting at the bottom of the page. (getting ahead of myself)
So all I did was add a new role for the new "users website", assigned that role every permission (as in an admin) and made the user part of that role.
THEN
I went back to the Mail-Chimp Module and noticed it had these settings at the bottom of the page.
Domain-specific settings
Save settings for:
O all domains
O example.com (title of the domain actually)
O example2.com (title of the domain actually)
Sadly I don't think this works...
While I can change the API-KEY from either Admin login account, the key remains a constant, which ever one is entered. However the Domain assignment stays correct for each domain.
What I couldn't figure out is in browsing phpMyAdmin, where this information is stored....I would have thought it would be in the table "mailchimp_user", but nope....still looking. FOUND IT, it was in the table "variable". I am now certain that Domain Access does not work with the mail-chimp module, or at least it doesn't create another setting table for the API-KEY for each mail-chimp account.
So I am going to contact the authors of the Mail-Chimp module to see if they can look in to this.
In the mean time, I am open to suggestions on the possibility of running the Mail-Chimp module from each assigned domain, but I am not sure if that would work.
for example
/sites/domain1/modules/mailchimp
/sites/domain2/modules/mailchimp
I am not sure if that would work though...and quite frankly how would the naming convention go for the "domainx" since they are sub-domains?
Ideas?
I think my answer is here -> http://www.trellon.com/content/blog/sharing-content-domain-access
But I am not sure if I understand it.
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
You're on the right track
no actually. you're on the right track.
when you go to the API settings and you see:
Domain-specific settings
Save settings for:
O all domains
O example.com (title of the domain actually)
O example2.com (title of the domain actually)
Set the API setting for example.com and select example.com from the "Domain-specific settings" option.
Then without logging out and while on that same page, set the setting for example2.com and select example2.com from the "Domain-specific settings" option.
This should set your settings that you want.
Unless you have a use case for it, I recommend you make all your admin settings from the main domain.
gclicon, I don't believe the
gclicon,
I don't believe the mail-chimp is compatible with domain access. By following your instructions only 1 API-KEY is shown in the database.
So here are my actual steps
1) I created a new domain record
2) I created a new user
3) I created a new role
4) I assigned full admin permission to that role and added that user from step 2
5) I went to the Domain Access Table Prefixing and created the following new tables for the 2nd domain
-Block (everything)
-Mailchipm (everything)
-PageTitel (everything)
-Statistics (everything)
-System
--cache_form
--cache_menu
--cache_page
--sessions
--url_alias
--variable
-XMLSITEMAP (everything)
6) I then went to the mailchimp settings and placed in the API-KEY for the main domain and selected that from the Domain-specific settings and saved the configuration. I then scrolled back to the top of the page (without logging out) and entered the API-KEY for the new Domain and selected that domain and saved the configuration.
7) I then went in to phpMyAdmin and did a database search for both API-KEYs, but only the main domain one shows up.
Any further ideas?
Something tells me this page may be useful but I don't understand it -> http://www.trellon.com/content/blog/sharing-content-domain-access
I think it allows the site to have two distinct profile setups for how Drupal will run on each domain, but I don't get it.
What is really disappointing is that the author for Mail-chimp has decided not to make it compatible with Domain Access at least at the moment, I am offering a donation of some amount, so if anyone wants to help out that would be great.
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
MailChimp should work
I don't think its a matter of the module being compatible with domain access or not. As long as you have domain configuration module turned on your variables get saved to the domain_conf table. The domain_conf table holds a serialized array of settings for a specific domain, including module settings/variables.
For now i'd recommend pre-fixing a minimum amount of tables. To get the MailChimp module to do what you want it to do, i think the only tables you need prefixed for now is the MailChimp tables.
Let me know how that goes. If that still doesn't work, i'll see if i get a chance to setup a sandbox and try it out myself.
Domain Access v. Multisite
I've been following this thread, and I know the advice has been toward Domain Access, but I thought I'd throw this out. A Multisite setup doesn't have the, what I call, code overhead as with Domain Access. Multisite is set up with a couple of simple steps, and you can turn on the module for whichever subdomain(s) you need, and they work independently of the top domain/subdomain. All the modules are with the top domain Drupal install. Each subdomain has it's own database, but you can share one, a couple, or all the tables if you'd like. I found some instructions to put the shared tables in a separate database outside of the Drupal installation, and it's working very well. I've gotten a couple of errors here and there particularly when I had a different theme for a subdomain, but when I refresh, Drupal reconciles them.
Susan
gclicon, I am still playing
gclicon,
I am still playing with it, but so far no go...
The problem is I see only 1 API-Key in the domain_conf table...which is the last one I put in.
I may have to consider multisite again.
Susan,
Do you know of a good tutorial for multisite? It is still a mystery to me and a bit confusing.
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
Multisite explanation
For a Multisites set-up, you have a top domain with all the modules, and set up subdomains pointing to the top domain modules. Each domain/subdomain has its own database. What you do is
(1) Set up a sym (symbolic) link between the top domain where the modules are and each subdomain. Here's the tutorial I used: http://www.webhostingclue.com/webmaster-tutorials/web-design/344-how-to-... -- worked like a dream on my shared web space. You'll have only a settings.php file in each subdomain directory.
(2) You set up prefix tables in each subdomain's settings.php file. I do not have the link, but the tutorial I found suggested creating a separate database outside of the Drupal install, and point the prefix tables to that shared database. Here's the syntax:
$db_prefix = array(
'default' => '',
'users' => '[dbname]_shared.',
'sessions' => '[dbname]_shared.',
'role' => '[dbname]_shared.',
'profile_fields' => '[dbname]_shared.',
'profile_values' => '[dbname]_shared.',
'authmap' => '[dbname]_shared.'
);
(3) I've used the Multisite Search module to search across all the domains. Easy to set up (after I figured out how the module wanted the links to read--you know that little blue text under the text box really helps), and it also works well.
And that's it. The hardest thing for me as I work with it is to remember what is being shared and what not, but I'm getting there. You are actually sharing modules and turning them on and off when needed in each subdomain, but you are not sharing the settings. My workaround is to set up one subdomain with all the features I'll want and export its database to a file in phpmyadmin. Then when I add more subdomains with the sym link, I drop all the tables Drupal created at the install and import the exported database from my set-up subdomain, so I at least have a base setup.
If you have any questions on any of this, feel free to contact me directly.
Susan
Ya lost me Susan.... so I
Ya lost me Susan....
so I found this set up and it seemed easy to follow...then I got lost at STEP 7 http://drupal.org/node/125539
It seems to me that this route creates a new database for every subdomain, thats not multi-site in my mind that is just setting up mutltiple sites.
In Step 7 it states: Use the following example to create and upload a php file onto your site. An easy way to do this is to use Notepad, pasting in the text below, editing as necessary, and then saving as multisite.php. Afterwards, upload via FTP or CPanel's File Manager. Make sure you change the path to whatever the path to your web root is.
"the example"
<?phpsymlink( '/home/username/public_html/', 'site1' );
?>
Look all I want do to is be able to have the setting for some of the modules to run independently. So I can install a new module for one doman and use it, the DB keeps it's settings, then I go to the next domain activate the same module from that domain, but have the settings store for that domain in a database...the same database would be nice with a different prefix.
So for example
MyREISystem.com is the full install, in other words the main holder of all the files, then I have
/sites/jake.myreisystem.com/modules
/sites/pete.myreisystem.com/modules
/sites/claude.myreisystem.com/modules
Each one of these will hold the modules specific to that sub-domain.... I hope this makes sense. Then each module would be something like this in the DB
mailchimp_user <-main domain of MyREISytem.com
jake_mailchimp_user <- for the subdomain of jake.myreisystem.com
One of the tables that I gets modified alot is the "variables" table, so I am assuming I would need a new table for each subdomain.
If anyone has some time today I would appreciate the ability to talk with them over the phone to finish this up.
Thanks
Will 619.993.5035
William, SoCalCreations.net, PWREnterprises.com, Real Estate passive income
Difference between Domain Access and Multi-site setup
With Domain Access you have one set of code and one database.
With the Multi-site setup you have one set of code with your top domain, and each subdomain has its own database. You can share tables between the top domain and the subdomains, like users and roles, with the prefix table code in settings.php.
Susan
The best tutorial to follow
You can go to http://www.webhostingclue.com/webmaster-tutorials/web-design/344-how-to-... if using shared hosting package (cpanel). I done drupal multisite with sub-domain without failure. The most important is the multisite.php script to create symlink(linux terms or shortcut(windows terms) program.
TQ.