Kory, you should keep these queries in the support list. There may be others with the same question, it saves bandwidth to answer the question for multiple people one time, and you are likely to get your answer sooner with multiple people seeing it.
On Sunday 12 February 2006 10:57 am, Kory Hamzeh wrote:
Jason,
Thank you for your help. I have one more question that I was hoping you can help me with.
I want to setup multiple drupal sites using different subdirectories instead of domain names or IP addresses. For example, my main drupal site right now is http://dilligaf.avatar.com. I want to create another independent site with the root address of http://dilligaf.avatar.com/site2.
I know I need to create a config directory in sites/dilligaf.avatar.com.site2/ and put seetings.php there, but what do I put in http://dilligaf.avatar.com/site2 directory? There must be at least an index.php there.
Normally, that directory would simply be a sym. link to the parent.
Also, do I need to create a separate MySQL database? I thought I could use the $db_prefix, by using a different prefix for each site, but when I do that, I end up with a blank page (I also did a symbolic link of the root html directory to the site2 directory). If I remove the $db_prefix, I end up back at the main site (this is with the symbolic link). And obviously, if I remove the symbolic link, I get an HTTP page not found error since the site2 directory is empty.
There are a couple of ways to handle this, and it depends on what your objectives are. You could use separate databases for each site or you could use a shared database. Also, shared databases could be anything from all tables shared to 1 table shared, depending on your needs.
Mostly, I guess the real determining factor would be how much of the two sites are going to have in common. If there will be lots in common, then share the database and use the prefix. If there is a necessity to have something in common (like user accounts), then share the database. If there is a lot of differences and nothing really required to be shared, then I think it is easier to keep the databases separate. I frequently make mistakes on my shared database environment, and it is more time consuming to maintain. I'm sure that if there is anyone with differing opinions, they will add to the discussion.
I did some searching through the Drupal Web site and was unable to find a page that explains how to do a shared database, so I'll post what I did here. I have one site that is into two parts: 1) public, and 2) private. For the public or main part, I have this in it's settings.php file: $db_prefix = "public_";
For the private part, I have this in it's settings.php file: $db_prefix = array("default"=>"public_", "accesslog"=>"private_", "blocks"=>"private_", "cache"=>"private_", "forum"=>"private_", "poll"=>"private_", "poll_choices"=>"private_", "remindme_node"=>"private_", "remindme_term"=>"private_", "signup"=>"private_", "system"=>"private_", "watchdog"=>"private_");
When I created the database, I did so with the prefix of public_, then I copied the various tables that the private site needed and changed their prefixes. So, for each table listed in the private settings.php file, I have both a public_ and a private_ prefixed table, but for each table not listed, the default prefix of public_ is used.
I hope that's not too confusing to understand.
-----Original Message----- From: Jason Flatt [mailto:drupal@oadae.net] Sent: Wednesday, February 15, 2006 8:14 AM To: support@drupal.org; Kory Hamzeh Subject: Re: [support] New Install Problem: Access Denied Importance: High
Kory, you should keep these queries in the support list. There may be others with the same question, it saves bandwidth to answer the question for multiple people one time, and you are likely to get your answer sooner with multiple people seeing it.
Thanks Jason. I managed to get everything working.
I send the e-mail privately to you only because I felt like I was pestering the list with basic questions.
Regards, Kory