I’m just experimenting with the Multi Site option in Drupal and from what I understand, it’s as simple as having a single code base and dropping in folders under the sites directory.
Am I right?
So…
On Ubuntu 10.04, I install the drupal6 package
I create a virtual server with DB in virtualmin and I change the document root to “/usr/share/drupal6”
I create a “settings.php” (777), “dbconfig.php” (775) and “files” (777) folder in a subfolder named “drupal” in the home directory, make sure the folder has execute permissions (I gave it 775)
I prefill “dbconfig.php” with the database information.
I create linked folder under “/etc/drupal/6/sites” named “pacyworld.co” to “~drupal”.
I visit http://www.pacyworld.co/install.php and go through the Drupal install
Change permssions of “settings.php” to 555
And it Works!
Now, if only Virtualmin could give us an option to create a “Drupal Server” and “Drupal Sub-Server” and do the above automatically.
Now, if only Virtualmin could give us an option to create a “Drupal Server” and “Drupal Sub-Server” and do the above automatically.
Mmm, well, that seems like the more difficult way of doing it
Rather than all the above setup – you could create a top-level Virtual Server, and install Drupal into it.
Then, just create a number of Virtual Server Aliases under that top-level server.
At that point, you could use multi-site Drupal without having to touch any file permissions.
If you happen to be a Virtualmin Pro user, you wouldn’t even have to go through the steps of manually installing Drupal, you could just load the Drupal Install script.
The alias method works great for some types of customers (and I do currently use it), but when you have customers who each want/need a dedicated top level server, the alias method isn’t practical.
Having a single Drupal code base has advantages. I could pre-load modules and themes and have them instantly available on all customer websites. While Virtulmin Pro may have some “perks”, the fact is that I am completely against paying a subscription based license and the perpetual license fee is just outrageous. Lets not turn this into a discussion about Virtualmin Pro.
I was looking at some of the server template settings, and much of the steps could be automated by creating server template for Drupal. I’ll try it and let you know of the results.
Tuaris - yeah, shared multi-site Drupal installs are OK for smaller sites - but with larger sites you want stand alone installs. To cover the issues with a base set of Drupal modules/themes, check out <a href="http://www.drupaler.co.uk/blog/how-drush-make-just-changed-my-life/481"Drush make. This lets you create a reproducible Drupal base much easier.
The problem with sharing modules across multiple sites in a single install is if there’s an update available, you need to make sure it works across all the sites using it before you can upgrade. This holds true for sharing Drupal itself across sites.
John
ps Drupal 7 came out…eek! I’m not nearly ready to migrate yet…
I am seeing what you guys are talking about, but calling the Alias method Multi-site seems like a stretch, because the aliases are pointer to the same code, and therefore, I am seeing that the “two” sites are identical, sharing content, theme settings, etc. There are also times where the alias gets confused, probably reads the settings.php, and redirects links back to the parent site, which blows the ruse entirely.
Where’s the “next level”, with separate databases, etc.? Can the aliases have databases? It’s a little confusing…
Within the Webmin part of Virtualmin, edit the Apache server directives for domain2.com
You should see something like this in the site list:
- Server Name: domain2.com
- Document Root: /home/domain1/domains/domain2/public_html
Edit the directives of the domain2 virtual server to match domain1:
- Before: /home/domain1/domains/domain2/public_html
- After: /home/domain1/public_html
(Note: Copy the entire directive into a text editor like notepad and do a replace-all of “/domains/domain2” to “”. This will change the entire site to match domain1, letting the Domain Access module do what it needs to)
Apply the Apache configuration and you should be set!