Multi-Site Installation | Root Site Fine | Other Sites Not Working

Fidelis - May 7, 2006 - 06:39

Although I have successfully logged in, configured and created my first page in the root directory of http://gov20.info, I can't suceed in making the other sites work:

  • I have successfully installed Drupal v4.7 at http://drupal.info
  • I have created 4 subfolders to a "sites" directory and named these subfolders "imf.gov20.info", "test.gov20.info", etc.
  • I have created 4 more MySQL databases, each of them with a distinct user / password connection string updated in a distinct settings.php file in each of the subfolders
  • I have also updated the base URL parameter in each settings.php file
  • Following the instructions of my service provider, I have redirected my subdomains to the root directory "gov20.info"

I would expect after all this that typing "imf.gov20.info" would bring me to a distinct site, but it only brings me to my original site. What am I doing wrong?? I attempted to follow the instructions at pp. 190 and ff of this book...

Thanks

Redirect and symlink

kuahyeow - May 7, 2006 - 14:07

I was just doing the same thing previously.

It seems that imf.gov20.info rediects to gov20.info

When that happens Drupal has no way of knowing it was imf.gov20.info. It only knows from the current web address.

What you really want is a "symlink" (Assuming you are using linux and you have shell access) from your subdomain http directory to your drupal directory. That way, imf.gov20.info will stay as "imf.gov20.info" when you type it in.

If you can't symlink, then I'm not sure what to do....maybe someone can help me out here

--
Cheers,
Thong

Tip: http://drupal.org/forum-posting
Website: http://www.edoodle.co.nz

It was too late when I wrote this...

Fidelis - May 7, 2006 - 14:35

In the first bullet, it should have read http://gov20.info instead of http://drupal.info

Thanks Thong - I'll try to work this through my provider because I do not have shell access...

patrick

Takes 3 hours?! discouraged.....

Fidelis - May 8, 2006 - 03:31

Well,

As a hosting service for http://gov20.info I am using Siteground. Although I do not have shell access, they provide C-Panel X v2.5.0. Here is what I have asked them:

Hello -

[...]

(3) Please install Drupal 4.7.0 in the root directory and have the following subdomains resolve to the same root directory:
- imf.gov20.info
- imli.gov20.info
- jag.gov20.info
- test.gov20.info

(this enables me to run 5 drupal sites off the same installation)"

Later I added this:

(A) DIRECTING REQUESTS FROM MULTIPLE SITES: I do not think the C-Panel allows me to do what follows. Here follows a "copy and paste" from my Drupal book, pp. 190-191:

"In order for you to be able to run many web sites off of one Drupal installation, your server needs to be told to direct requests from multiple domains to the same place. With such a configuration, the following domains would all get sent to the same document root directory and would thus all be handled by the same index.php file:

- www.yoursite.com

- www.secondsite.com

- subdomain.yoursite.com

"Once this is the case, you can then configure Drupal to use the domain to determine which configuration file to load, and thus which web site to display.

"The Apache web server refers to this type of configuration as virtual hosting, or vhosts. You can configure your Apache server to direct multiple domains to the same document root. The following snippet from an Apache httpd.conf file is representative of the goal at hand:

# Substitute your IP address
NameVirtualHost 111.22.33.444

DocumentRoot /absolute/path/to/drupal
ServerName yoursite.com

# Note that the DocumentRoot is exactly the same for both VirtualHosts
DocumentRoot /absolute/path/to/drupal
ServerName secondsite.com

"If your site is being hosted by a company that doesn't let you edit the httpd.conf file, you need to explore what options the service offers for achieving the same thing. Some call these aliased domains, others call them parked domains. The basic principle is always the same, however; each of the various domains is sent to the same document root in order to be handled by your Drupal installation. Ask your hosting company for advice concerning virtual hosts (...)"

I took the time to re-type all of this so that you know what I am trying to achieve.

In other parts of the same book they describe how to structure the subfolders of "sites" to match the domain names and how to modify the settings.php files in these subfolders - *I have done all that*, and created the associated databases. All that I am asking you :-) is to help me setup correctly this virtual hosting thing.

Still no success. Last I tried:

Hi Brandon,

Before anything, please review the following:

- ticket 63621, 13 April @ 8:30 am, see (2)
- ticket 68921, 5 May @ 9:31 am, see (3); and especially 6 May @ 11:54 am see (A) -> very detailed explanations and I copied the relevant sections of a Drupal book on topic
- ticket 69129 (this ticket), above

You can also see: http://drupal.org/node/62255

Once you have reviewed this, I think you will understand what I am trying to achieve: running several sites from the same Drupal installation.

There is nothing to change "in" drupal, so you do not need the Drupal login details.

What should happen, if you follow the instructions from the book that I retyped in ticket 68921 - 6 May @ 11:54 am under (A), is that each of the following URL's:

- http://imf.gov20.info
- http://imli.gov20.info
- http://jag.gov20.info
- http://test.gov20.info

...will make end-users arrive at a distinct Drupal home page. In order to make this happen, I have already created the 4 additional databases, imported the drupal schema, created distinct connection strings and correspondingly configured the connection string and base URL in each settings.php file located in the "sites" subfolders corresponding to the subject subdomains.

Because I do not think this is a simple matter of subdomain redirects (as Kenny in ticket 63621 implicitly acknowledged), I have just removed these redirects.

Thank you,

patrick cormier
http://claimid.com/patrick-cormier

This is their final reply - at least $50/hr for three hours; does this make sense?!!

Hello Patrick,

I understand now what you are trying to achieve. While you were writing your post I have already been trough your ticketing history.

I regret saying this, but unfortunately, the service that you are requesting is far beyound the free webhosting related support that we are offering.

Well, we are very skilled in performing such operatons, but as you know -- they are a lot time consuming and require dedicated effort for at least three-four hours. The price for this kind of support is $50 per hour and an estimate, as I can see is at least three hours.

If you insist having this performed by us, please open a new ticket so we can provide you with a payment link and escalate the ticket to our developement squad, that is not providing such support, but will do an exception for you, advised by us.

Regards,

Brandon Fiery
Senior Support Team
support@siteground.com
www.siteground.com

Does this make sense to you? I'm not a programmer but from my drupal book, pages 190 and ff, it only seems to take a few lines in httpd.conf to do!!

I need your advice: should I change hosting service, am I not communicating clearly with their tech support, etc...??

Thanks......

patrick

I think you are correct

kuahyeow - May 9, 2006 - 00:08

Yes, it should be just a few lines in the conf file,

but as the book says, maybe you can try parked domains, or add-on domains. I see that you have cPanel X 2.50 too, so you may have those features. If I were you, I will try parking http://imf.gov20.info on top of http://gov20.info. See if that works (fingers crossed).

As for the fees and hours, it really depends on which level of support staff you are talking to and the market rate for the country it is in...

--
Cheers,
Thong

Tip: http://drupal.org/forum-posting
Website: http://www.edoodle.co.nz

I Tried...

Fidelis - May 9, 2006 - 01:34

I tried redirecting http://imf.gov20.info to http://gov20.info and sure enough it would redirect me, but to the root site, not to the "imf" site, and the URL in the browser window reverted to http://gov20.info as opposed to keeping http://imf.gov20.info... Not fun!

patrick cormier
G2TT, IMN, Slaw

Addon domain?

kuahyeow - May 9, 2006 - 02:03

How about "addon domains"?

Check out the following definitions to clarify between redirects, addon, and parked domains at http://manual.amstechdns.com/redirects/

Has anyone else has any better experiences with cPanel?

--
Cheers,
Thong

Tip: http://drupal.org/forum-posting
Website: http://www.edoodle.co.nz

Multisite + cpanel -ssh -apache.conf + .htaccess + Rewrite

kuahyeow - May 9, 2006 - 06:49

Maybe this will work:

http://drupal.org/node/37177#comment-68606

However that is for www.example.com/site, not site.example.com... You might need to modify it a bit

--
Cheers,
Thong

Tip: http://drupal.org/forum-posting
Website: http://www.edoodle.co.nz

Ok - it works now

Fidelis - May 9, 2006 - 12:20

Works now... I purchased an add-on domain ($15/yr)... thanks!!

how did it work?

TheFazz - June 4, 2006 - 06:04

fidelis

appreciate if you could share how you managed to get the add-on domain to work? i use cpanel with no shell access and i am having great difficulty in setting up the multi-sites (using subdirectories and subdomains). would like to know how you did it with add-on domain (does this mean another domain?).

fazz

http://www.thefazz.com/

This is what I have done

Fidelis - June 5, 2006 - 01:31

I was confused with the c-panel icons and their meaning: parked domains, add-on domains, subdomains; and how to reconcile this with the drupal multi-site capabilities...

This is what I have done:

  1. Purchase additional domain names from your hosting company (it won't work with subdomains - I tried), about U$15 a year
  2. Follow the multi-site installation steps as explained in the book by Robert Douglass - basically creating a "sites" directory in your root drupal directory, then creating as many subdirectories as you have different web sites that you want running off the same installation, each subdirectory bearing the exact name of the purchased domains without the "http://" prefix. For example, I have the domains and subdirectories "patrick-cormier.info" and "gov20.info"
  3. In each of these subdirectories, copy and paste the settings.php file and change its parameters according to the base URL, database name and database user info. This assumes you have created as many databases as you have web sites, imported the SQL definition file, established the connection string - for each domain, etc. (the book has more details on how to do this)
  4. In your C-Panel, go to "Parked Domains". If yours is like mine you'll get this message: "Domain pointers allow you to point or park additional domain names to your existing hosting account. This will allow users to also reach your website when entering the parked or pointed domain into their browsers." That's what you want - complete the form for as many domains you have purchased.
  5. Shortly thereafter, try each domain, make sure you're the first user to create User 1 on each site, and voilà - you're good to go. :-)

patrick

thanks, but i don't intend to buy new domains...

TheFazz - June 8, 2006 - 05:55

thanks fidelis.

your solution requires the purchase of additional domains... which is not quite what i had in mind. 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.

i also would like to check whether my understanding of root directory is the same as expected in the drupal handbook. my root directory is not accessible via the root domain (eg. http://www.thefazz.com/). my root domain (http://www.thefazz.com/) actually points to a subdirectory to the root.

the root directory is "/" and contains the subdirectories such as the following...

* .cpanel-datastore
* .fantasticodata
* .trash
* etc
* mail
* priv
* public_html

the http://www.thefazz.com/ 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 is http://www.thefazz.com/subsite

this is where i get severely stuck. unfortunately, i've not gotten much luck on guidance in this regard (perhaps because it is not possible on cpanel hosted sites because i cannot access the htaccess).

cheers
fazz

http://www.thefazz.com/

any help?

TheFazz - September 18, 2006 - 14:50

can anybody help me on this?

http://www.thefazz.com/
http://www.my-kart.org/

Your understanding of root

Sutharsan - September 20, 2006 - 11:11

Your understanding of root is correct. Root is where the domain name points at. Thus the (content of) "/public_html".

If it is acceptable to reach your subside with: "www.thefazz.com/subsite", you can do with a standard multi site installation. No .htaccess change is required, no additional domain names.

thanks but...

TheFazz - September 20, 2006 - 16:12

sutharsan

thanks for the response. however, i tried doing the standard multisite install with a couple of variations:

option a. maincode installed in /firstsite/ subdirectory from the root (url1 = www.thefazz.com/firstsite). i would like to access another site via url2 = www.thefazz.com/nextsite. so i created the subdirectory under /firstsite/sites/thefazz.com.nextsite/ but i cannot seem to access it via the url2 above.

option b. maincode installed in / root directory (ie public_html) (url1 = www.thefazz.com). i would like to access another site via url2 = www.thefazz.com/nextsite. so i created the subdirectory under /sites/thefazz.com.nextsite/ . Still, i cannot seem to access it via the url2 above.

i posted originally on this thread.
http://drupal.org/node/64591#comment-122097

i still do not know how to set it up properly. i've read the handbook and the install instructions over and over again and i am confused.

still needing help.

cheers
fazz

http://www.my-kart.org/

any answers to this?

TheFazz - October 14, 2006 - 06:09

anybody got any answers to this?

i am trying to use symlinks... but not sure how to set it up. appreciate any help i can get.

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

ln -s root root/nextsite

and...

ln -s root/ root/nextsite/

and...

ln -s /public_html /public_html/nextsite

and...

ln -s /public_html/ /public_html/nextsite/

neither works.

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

http://www.my-kart.org/

new topic to continue this discussion

TheFazz - October 28, 2006 - 02:23

i have decided to create a new topic to refocus this discussion:

http://drupal.org/node/91684

Multiple domain delivery on single codebase with single database

jiangxijay - September 28, 2006 - 01:02

This works perfectly with Siteground. However, after quite a bit exploration and experimentation, I only just found these instructions! How do I help get your instructions escalated to be included in the multi-site instructions to help others sooner in the process? :)

Summary:

Place the complete Drupal install in the root folder of a hosting account.

For each additional domain you would like to have delivered by a single-codebase, single-database install of Drupal, you simply do the following:

- Register the additional domain at any registrar.

- Apply the nameservers for your root/Drupal account, wherever it's hosted.

- Wait 24 hours.

- If your host uses cPanel, select Parked Domains.

- Add the domain name you wish to have server by Drupal.

- Make a copy of the SQL database, find and replace to add a prefix, according to Drupal instructions.

- Import the additional SQL tables with a unique prefix for this domain.

- In the /sites/ directory, duplicate the /default/ directory and name it with the exact domain name you're parking. Include the prefix and domain in the file.

That's it. Not exactly automated, but pretty elegant.

I'm new to Drupal, so this cheat sheet would benefit from more experienced editors. But, basically, it works with Siteground.

1Q) If we install Drupal on

Success - November 12, 2006 - 15:25

1Q) If we install Drupal on Domain A and point Domain B & Domain C to it, how do we install vBulletin for Domain B & C?

2Q) Should we even create an account for Domain B & Domain C in our WHM (Web Host Manager)? Or, we don't create them as real hosting account and just point them to Domain A in Domain A cpanel?

3Q) This is related to the question above. Should the Drupal database for Domain B & C be created in their own hosting account or on Domain A account?

anyone?

Success - November 13, 2006 - 19:34

anyone?

New thread for this question

jiangxijay - July 12, 2007 - 00:52

I am now working on this issue, too. I've posted the details in a new thread ...

http://drupal.org/node/158673

For yor parked domains, are

Success - December 3, 2006 - 03:17

For yor parked domains, are you able to

- Ftp
- create database
- send and receive emails

?

multi-site and legacy files

kvarnelis@drupal.org - February 8, 2007 - 15:42

What about legacy files? I have been thinking of going multi-site but I have some existing directories and files in some of my domains. Can these be put in the subdirectories in the sites directory??? one code base would be fantastic...

 
 

Drupal is a registered trademark of Dries Buytaert.