Plesk and Drupal-Multisites
In order to benefit from drupals amazing functionality concerning multisite capability, you have to do some extra-stuff in your plesk-config, more precisely in your vhost-config.
Example scenario
You administer 50 customer drupal sites on your plesk-server. Every time a new drupal release comes up, you have to update every single one of this 50 installations (we didn't even talk about the modules).
No question: enormous waste of time and disk space.
Let's dare an approach
Create a main drupal installation on a subdomain of your main vhost. Let's call the subdomain "drupal.mydomain.com".
This installation will be the core/host of all your customer sites.
Visit your plesk admin interface. Call the domain of your first customer. Let's say "customer.com". Then: "Web Site" -> "Change Hosting Type": Change to "No Hosting". This will disable Webhosting for this domain.
Attention!! This will delete the main /var/www/vhosts/customer.com folder of your customer!! If you have any important data in the according directory, I suggest to do a backup, otherwise it will sure be lost.
Ok, for now, we have a customer without webhosting. Email and all other hostings stay the same.
Now we have to re enable webhosting for "customer.com". Not here but in the conf-file of your subdomain "drupal.mydomain.com".
Open the file /var/www/vhosts/mydomain.com/subdomains/drupal/conf/vhosts.conf
If it does not exist, create it. Add these lines, according to your needs:
ServerAlias www.customer.com
# wild card, if you want: (the line above are no more necessary)
ServerAlias *.customer.com
After saving this file (only root can), you have to execute this command in order to assume your changes:
Now, www.customer.com is "redirected" to drupal.mydomain.com.
To tell your drupal-installation to display another drupal site than your default one, you have to create the directory sites/customer.com.
In this directory you have to
- copy your sites/default/settings.php (commenting out your database-settings of the default site)
- create and chmod 777 the files directory
- create the themes directory and load the themes in (if needed)
After doing this, visiting customer.com should redirect you to a new setup of your drupal page. After setup (database etc) you are able to visit the new drupal site.
Now, enable and config your themes and modules.
One word to modules
Generally, add every module you need in the main modules directory in sites/all/modules. This makes it easy for you to update the modules when new releases come up.
Enable only the needed modules in your customers admin/build/modules page.
Only add modules in sites/customer.com when it's a really special module with absolutely rare chance to be of use for other customers.
Updating
After you have updated the files of the drupal-core or modules, you have to run update.php for every site using it.
Problems not yet solved
- Customers cannot have subdomains
- Customers cannot have ftp-access to anywhere

Kommentar hinzufügen