Multi-Site Installation - cannot get it to work

TheFazz - October 28, 2006 - 02:11

I have posted a couple of requests for support on the following threads:

http://drupal.org/node/62255
http://drupal.org/node/62255#comment-126256

http://drupal.org/node/64591#comment-122097

...but can't seem to get any answers. perhaps my requests are buried deep in the thread. so i decide to create a new thread to seek help.

what i am trying to achieve

i would like to setup more than one drupal site using a single code base. each site would have different settings / databases. i do not want to have subdomains (although this could be a later requirement) or parked domains (as suggested by fidelis on http://drupal.org/node/62255#comment-126409). my response: i intend to set up various community interest sites with a single domain as being the traffic aggregator, so the additional domains is not an option.

the problem

my main site, http://www.tivix.net/ points to "/public_html", which in my understanding is the drupal root. all my drupal files and subdirectories are installed in "/public_html", so the sites directories are located: "/public_hmtl/sites" and the corresponding url for the second site is intended to be http://www.tivix.net/newsite

I have setup the configuration on sites/www.tivix.net.newsite/settings.php accordingly with the necessary mysql database access variables (different from the mainsite database) and the base url being http://www.tivix.net/newsite

when i point the browser url to http://www.tivix.net/newsite it does not reach the newsite controls & database, but instead reaches the mainsite controls with a "page not found" error.

i considered the standard multisite install with a couple of options:

option a.
maincode installed in /firstsite/ subdirectory from the root (url1 = www.tivix.net/firstsite). i would like to access another site via url2 = www.tivix.net/newsite. so i created the subdirectory under /firstsite/sites/www.tivix.net.newsite/ but i cannot seem to access it via the url2 above.
option b.
maincode installed in / root directory (ie public_html) (url1 = www.tivix.net). i would like to access another site via url2 = www.tivix.net/newsite. so i created the subdirectory under /sites/www.tivix.net.newsite/ . Still, i cannot seem to access it via the url2 above.

using option b above... i tried symlink as follows:

ln -s root root/newsite

and...

ln -s root/ root/newsite/

and...

ln -s /public_html /public_html/newsite

and...

ln -s /public_html/ /public_html/newsite/

neither works.

anything else needs changing? .htaccess perhaps? if so, what do i look for and change?

what i am using

  • cpanel based shared webhost
  • php 5.1.5
  • mySQL 4.1.21-standard
  • phpmyadmin
  • drupal 4.7
  • putty SSH
  • url friendly links

no shell access.

my skill level

beginner. i know very little of unix / linux commands. very little of htaccess. i've read the handbook and the install instructions over and over again and i am very confused. i still do not know how to set it up properly.

I appreciate any help i can get here.

cheers
fazz

some further queries

TheFazz - October 28, 2006 - 02:32

how should the admin url for the newsite look?

the mainsite admin url would be www.tivix.net/admin

would the newsite admin url be www.tivix.net/newsite/admin?

what about the posts, nodes, blogs, themes?

Multi-site

GSMKer_Kevin - October 28, 2006 - 02:55

You are on the right track with option b, your symlink is incorrect.

Try the following for your symlink:

ln -s ./ ./newsite

The symlink should be created in the root directory of your Drupal install.

Hope that is helpful to you?

gsmk.com
The only barriers that exist are the ones we create!

At least one of your

cog.rusty - October 28, 2006 - 03:19

At least one of your attempts should have worked.
What was your current directory when you typed ln -s /public_html /public_html/newsite?
Ok let me make a checklist.

1. You don't touch your .htaccess and you don't redirect anything.

2. In cpanel, you create a subdomain called "newsite.site.com"

3. When you do that, cpanel creates a subdirectory called "newsite" just under your "public_html" directory.

4. Then you go inside "public_html" and delete this "newsite" subdirectory. (You are going to replace it with a symlink.)

rm -r newsite

5. While you are still inside "public_html" you type:

ln -s . newsite (notice the dot)

and you have a symlink called "newsite" just under your "public_html", which leads back into "public_html".
Normally, that should do it.

***
Edited to add: Two basic unix commands to assist you in your navigation:

pwd (print working directory) shows you the name of the directory in which you stand.
ls (list) lists the files and subdirectories which are under your current directory.

thanks!

TheFazz - October 28, 2006 - 03:24

GSMker_kevin & CogRusty:

thanks a bunch. i now realised that i was creating the symlinks from the "/" directory and not from the root (/public_html/) directory. also the dot, pwd and ls helped. now the symlink is working. this is great!

appreciate the quick help.

fazz

 
 

Drupal is a registered trademark of Dries Buytaert.