Chris's picture

After spending the afternoon scratching my head on this, I've figured out how to perform a Drupal multi-site install using Turnkey Drupal6 and Amazon EC2. 

(This information is based upon other more general Drupal articles but is specific to issues using Turnkey Drupal 6 on AWS.)

First carefully follow instructions elsewhere on this site on successfully setting up the Drupal 6 Appliance as an instance in the Amazon cloud.  Ensure that the Default single drupal is running prior to creating a multisite host.

 

  1. First go to phpmysql and verify that you have a user setup with the proper permissions.  If not create a user with SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER permissions. (in this example we will use user "drupal6")
  2. Then create an empty db for my site: eg: mysite_db
  3. Go to /usr/share/drupal6/sites/ and copy the default directory
  4. Renamed the default directory according to the name of the domain: eg: mysite.org
  5. Open up mysite.org directory and edit the dbconfig.php file.
  6. 		$dbuser='drupal6';
    $dbpass='userpassword';
    $basepath='';
    $dbname='mysite_db';
    $dbserver='';
    $dbport='';
    $dbtype='mysql';
    
  7. Save file. 
  8. Repeat steps 3-7 for each of the sites you will be hosting.
  9. Then open the Apache configuration file at /etc/apache2/sites-available/default

  10. Look for the Directory sections for "/" and "/var/www/" and change the line:

    AllowOverride None
    to
    AllowOverride All

    (See https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles for more information).
  11. Save this file.

  12. Create a new vhost file and enter the following - replacing bolded items  (this is a funtional example):

  13. 		<VirtualHost *:80>
        ServerName www.mysite.org
        ServerAlias *.mysite.org
        UseCanonicalName Off
        ServerAdmin  admin@mysite.org
        DocumentRoot /usr/share/drupal6/
    </VirtualHost>
    
    <Directory /usr/share/drupal6/>
        Options +FollowSymLinks
        AllowOverride All
        order allow,deny
        allow from all
    </Directory>
    
    
  14. Close and save the vhost file using a name based upon your site's domain (eg: mysite.org )

  15. Repeat steps 12 - 14 for each of the sites.

  16. Now that vhost files have been created, for each site you wish to enable, enter "a2ensite sitename" (example: "a2ensite mysite.org")

    (for more information about a2ensite and a2dissite see here)

  17. When you are finished reload apache.

  18. 		sudo /etc/init.d/apache2 reload
  19. Go to your DNS hosting service and, for each domain set the CNAME record to the AWS Public DNS (example: www = ec2-85-121-347-131.compute-2.amazonaws.com).  Set the A (HOST) record to either the public DNS or IP number.  (Sorry, not trying to be vague, but this step differs widely depending upon vendors and is beyond the scope of this tutorial).

  20. Then go to the drupal install page for your new site (eg: www.mysite.org/install.php ) and follow the standard Drupal install proceedure.

  21. Enjoy your Drupal multi-site!

Forum: 
Jeremy Davis's picture

But as Drupal 6 is installed from the default Ubuntu repos you shouldn't just overwrite the files.

To get rid of the current Drupal 6 first you would use a command something like: apt-get remove drupal6 (assuming drupal6 is the name of the package). This will retain the current config for Drupal (which may or may not be useful - to get rid of all config info too use the --purge switch).

Then to install Drupal 7 you should be able to find an online tutorial (perhaps in the Drupal documentation) on how to install it to Ubuntu 10.04/Lucid (the basis of TKL v11.x).

And yes you can upgrade Webmin and install Virtualmin but I'm not sure on the best way to go about it. But as TKL is comletely open source you can pretty much do anything you want (assuming that it's technologically possible and you have the expertise or access to someone that does).

Add new comment