Multisite Drupal with multisite embedded G2

flomby

Joined: 2007-12-21
Posts: 1
Posted: Fri, 2007-12-21 14:53

I have a VPS with full root access. What I want to achieve is virtual hosts (www.example1.com, www.example2.com), each running Drupal with the G2 module. I want each site to be independent and not share users, content or albums. I am attempting this with Drupal 5.5 and the 5.x-2.0 Gallery module. First, is this currently possible?

Here is how I configured the server:
Each Drupal installation has it's own database.
Each Gallery installation has its own database and storage path.

http.conf sets the following:

<VirtualHost *:80>
  ServerName www.example1.com
  ServerAlias example1.com *.example1.com
  DocumentRoot "/var/www/example1.com"
</VirtualHost>
<VirtualHost *:80>
  ServerName www.example2.com
  ServerAlias example2.com *.example2.com
  DocumentRoot "/var/www/example2.com"
</VirtualHost>

The directory structure is as follows:

/var/www/drupal                  (Drupal 5.5 codebase)
/var/www/example1.com -> drupal  (Symlink to Drupal codebase)
/var/www/example2.com -> drupal  (Symlink to Drupal codebase)

I did the initial Drupal installation/setup of both virtual hosts. Then I copied the Gallery 2.2.3 codebase to

/var/www/drupal/gallery2

I ran the Gallery 2 Standard installation by navigating to http://www.example1.com/gallery2/install. Then I ran the Gallery 2 Multisite installation by navigating to http://www.example2.com/gallery2/install, and installed it to

/var/www/drupal/sites/example2.com/gallery2/

Then I installed the Drupal Gallery module in www.example1.com, and I can see it's albums - Good! Then I installed the Drupal Gallery module in www.example2.com, and I can see the albums from www.example1.com - Bad!

Also, I can get to the standalone www.example2.com albums if I navigate to http://www.example2.com/sites/example2.com/gallery2.

So, this is not the independent installation I need. Am I doing something wrong, or am I just asking too much of the current module? I would be more than happy to help document this sort of installation if I could just understand it.

Thanks for any tips/tricks,
flomby

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Sun, 2008-01-13 23:13

Multisite Drupal and Multisite G2 installations are not supported by the G2 URL Rewrite module out of the box. The reason is that at the time you configure your second gallery in Drupal it overrides the .htaccess rules of the first install (Drupal only has one .htaccess file for all multisite ;) ). As a workaround you can merge the rewrite rules of both installations manually (read http://codex.gallery2.org/Integration:Drupal:Installation:URL_Rewrite or http://drupal.org/node/135402).
If its not a rewrite issue you are experiencing, please let me know and I will think about your configuration again. But it should be possible to run your setup as described above (actually I know people using this kind of setup).