Hello All -

I have spent the last five nights trying to set up multiple sites in Drupal. Here is what I am trying to achieve:

I would like to set up different domains in the sites folder and these domains would run off their own database. Not a shared database. I already have a site set up and wanted to set up another for testing purposes so as not to "junk up" the existing site.

Folder structure is as follows:
wamp
www
drupal
sites
default
grocerycritic.com - this is the working site
litterbox.com - this would be the testing site

I added the virtualhost blocks to httpd.conf:
NameVirtualHost *:80


DocumentRoot /wamp/www/
ServerName localhost


DocumentRoot /wamp/www/drupal
ServerName grocerycritic.com


DocumentRoot /wamp/www/drupal
ServerName liltterbox.com

I added the IP addresses to C:\WINDOWS\system32\drivers\etc\hosts
127.0.0.1 localhost
127.0.0.1 grocerycritic.com
127.0.0.1 litterbox.com

I changed the settings.php in each folder to point to the database set up for them. I uncommented out the base URL and put that in:
$db_url = 'mysql://root:psswrd@localhost/databasename';
$base_url = 'http://www.grocerycritic.com';

The end result after all this is: The requested URL /grocerycritic/ was not found on this server.

I did follow these instructions that were posted to me earlier today: http://drupal.org/node/495760

I have looked all over for solutions to this issue. One solution was to change AllowOverride None to All in the httpd.conf file. After I did that I could not get Apache to restart. I commented out the whole Directory block and Apache did restart.

Right now I am contemplating two choices:
Wipe out the whole WAMP and Drupal installation and start over
or
Forget the whole thing and set up a test site under it's own Drupal installation

Any help is greatly appreciated!

Thanks
Kecia

Comments

dunkoh’s picture

Hard to tell from your folder structure list - but the folders for the two sites should be within the sites folder not the default folder...

drupal
-sites
--default
--grocerycritic.com
--litterbox.com

Can you confirm if this is the case or not?

Kecia’s picture

The folders are within the sites folder. What you put is correct.

Also - I'm on Windows XP Pro running latest version of WAMP with Drupal 6.11

One thing I did notice - between different tutorials. When I set up the virtual blocks on httpd.conf I get "URL does not exist" error. When I set them up on httpd-vhosts.conf I get "You do not have permission" error.

Yes - I do have .htaccess in my drupal root folder. Does something on there need to be changed?

Should I give XAMPP a try instead of WAMP? Should I set up the virtual blocks on vhosts.conf and then try changing the permissions through Apache??

Should I use WordPress (just kidding!!) I really want to figure out what is going on here.

Thanks for your reply!
Kecia

dunkoh’s picture

also... Anything besides the db settings and base URL that you changed in the settings.php? You shouldn't need to uncomment the base URL... I would leave that commented for now.

Do you have an .htaccess file in your drupal root?

btw - hopefully your db connection info above isn't the real info (you're telling the world what it is... esp. since you're using the root account)

Kecia’s picture

I didn't change anything else in the settings.php.

And yes, there is .htaccess in the drupal root folder.

I edited the line with the database info. It was late and I was frustrated - didn't think about that. :)

Thanks for your replies!

Kecia’s picture

It's all working now - still too happy about it!! :)

Also wanted to post the "solution" here as in my searching I found way too many posts that just stopped.

What I did was uninstall WAMP and installed XAMPP. Under xampp/htdocs/drupal/sites I added the folders for additional sites. I did *not* put a .com after the names.

I followed these instructions: http://drupal.org/node/137490

When calling up the site in the browser just type in the site name - exp: http://litterbox/

I have to say - most of my issues were probably user related. I am by no means a programmer and I think I may have been trying to call the site up incorrectly in the browser. I'm used to putting in the 127.0.0.1 before the site name. That is how I had it set up previously.

I decided to use XAMPP instead of WAMP as it seemed that is what most people are using. So far I'm happy with it.

Hope this post will help future confused people like me!

Kecia

khawshik_2’s picture

Drupal tutorial

this could be help you