My requirement is to have a common registration process and multi site search. I already have one site up and running. Any instructions to add another site to the existing configuration?

http://drupal.org/node/43816

I checked this, but seems like this setup is for creating from the scratch. Also there are many options, not sure which way is better for my requirements. Thanks,

Comments

vm’s picture

scratch or already existing, the method is the same.

There are a few vids and presentations that can be found with google as well that help walk you through the process.

Kecia’s picture

I am also attempting to set up multiple sites under one Drupal installation. I have followed the instructions to various tutorials - including the one linked here in the previous post.

One thing I did noticed in the different tutorials is that one will say to put the virtual host blocks in httpd.conf and another says to put the virtual blocks in the httpd-vhosts.conf file, where a third tutorial didn't even mention the virtual blocks. All they did was add the localhost IP address to the hosts file under Windows 32 and their sites worked. That tutorial was also listed here on the Drupal site.

So far I have my folder structure set up like this:
www
drupal
sites
default
site1.com
site2.com

I added to my hosts file: 127.0.0.1 site1.com and 127.0.0.1 site2.com

I added a virtual host block to my httpd.conf file:

NameVirtualHost *:80


ServerName www.site1.com
ServerAlias site1.com *.site1.com
DocumentRoot C:/www/drupal

When I attempt to access anything now, even 127.0.0.1 - I get 403 Forbidden - You don't have permission to access / on this server.

That's where I'm at now. Everything I have read says this may be an apache permission issue. However, everything was working until I added the virtual hosts blocks. Take those away and I can access the default folder.

Any thoughts - suggestions are greatly appreciated. I know this is supposed to be a very powerful feature of Drupal - setting up multiple sites under one installation - just doesn't seem that has successfully done it. There are a ton of tutorials on how to do it - but when someone has an issue I can't find any solutions that help and the thread just dies off.

I have been trying everything for the last four days - I'm sure it's a simple solution and I am by no means a programmer.

Thanks
Kecia

WorldFallz’s picture

The reason this can be complex has nothing to do with drupal-- the drupal portion of this setup is quite straight forward. The complexity is due to the various operating systems, web servers, and methods of setting up the redirection to the base drupal directory.

Apache configuration is still mostly black magic to me, but I use the following and it works fine:

hosts file: 
  127.0.0.1       example.com

httpd.conf file:
<VirtualHost *>
  DocumentRoot /absolute/path/to/main/drupal
  ServerName example.com
</VirtualHost>
Kecia’s picture

Thanks for the quick reply.

Just FYI - running latest version of WAMP on Windows XP Pro with Drupal 6.11

Just curious - when you set up the folder under sites, do you put the .com as part of the folder name? I have seen examples that do that and some that don't.

Also on my agenda to try is changing the permissions on the folders through Apache chmod.

Thanks,
Kecia

WorldFallz’s picture

I believe you have to name the sites subdirectories exactly after the domain name of the site, but it could be just a convention, i'm not sure.