I just can't get my head around this thing. Here's where I am:
I have the root drupal directory in defaultsite.com/drupal
I have subsites set up as:
drupal/sites/defaultsite.com.site1
drupal/sites/defaultsite.com.site1
etc.
In public_html, I set symlinks, like:
ln -s drupal site1
etc.
The sites are accessed like:
defaultsite.com/site1
etc.
All of these are working fine. Now, I want to set up site3-domain.com and am having trouble. Here's what I did:
Parked site3-domain.com on defaultsite.com
Created directory drupal/sites/site3-domain.com
Copied default.settings.php there, renamed to settings.php, set permissions to 666
Created files directory and set permissions to 777
Created a new database
Copied install.php into drupal/sites/site3-domain.com
When I browse to www.site3-domain.com, I get the directory listing for defaultsite.com.
When I browse to www.site3-domain.com/install.php, I get a broken link error.
What am I doing wrong?
Comments
are they subdomains?
Aren't you setting up subdomains? If so, with site1 being a subdomain
drupal/sites/defaultsite.com.site1
needs to be
drupal/sites/site1.defaultsite.com
and you access the site by site1.defaultsite.com not defaultsite.com/site1
perhaps what may be causing some confusion for you is that your webhost creates a folder with the new site name after setting up your subdomain, but that's irrelevant to what you're doing
I don't want site3-domain.com
I don't want site3-domain.com as a sub-domain. I want to access it as http://site3-domain.com, and I want that to show in the address bar. Maybe I named 'em a little funky, but hopefully you get the idea.
Still stuck
"Aren't you setting up subdomains? If so, with site1 being a subdomain
drupal/sites/defaultsite.com.site1
needs to be
drupal/sites/site1.defaultsite.com
and you access the site by site1.defaultsite.com not defaultsite.com/site1"
I see that I didn't answer your question. Yes, the first sites were subdomains that I wanted to access like "defaultsite.com/site1" and not "site1.defaultsite.com". Anyway, these are working fine. But now I want to add a true domain, like site3.com and have it accessed like "http://site3.com" with that showing in the browser address window.
Since I do not understand the logic behind how Drupal does what it does with multisites, I cannot reason out how to make this work nor what I am doing wrong, so...
still stuck.
You need to copy install.php
You need to copy install.php file to the root of main site's folder, where index.php, cron.php, etc exists.
Also, there is no need to copy install.php to /sites/site-name/ folder.
It's correct that site3-domain.com give the dir listing of main site. So simply copy install.php to main site's root.
Keep in mind whatever you do in the instalation. Sometimes, if you did any mistake, you'll get a redirect loop error from browser(redirecting between install.php and index.php so you can undone if you can remember what you did.
Hope that helps :)
Thanks, Ayesh, but the first
Thanks, Ayesh, but the first problem is that when I browse to site3-domain.com, I am directed to defaultsite.com/public_html. I imagine that I first need to redirect it to defaultsite.com/public_html/drupal via a proper symlink, and nothing I've tried so far has worked.
For example, the following does not work:
SSH to defaultsite.com/public_html
ln -s drupal site3-domain.com
Just for clarity, here is the directory setup:
defaultsite.com/public_html
-----drupal
--------sites
-----------defaultsite.com.site1
-----------defaultsite.com.site2
-----------site3-domain.com
The two subdirectories are working fine. It's the true domain (site3-domain.com) that I am having trouble with.
Thanks again.
Check your .htaccess (or httpd.conf)
I'm wondering if one of those is mis-configured.
My multi-site installation is on a cPanel hosted environment. All I have to do to add a new domain to my "stack" is
1. Go into cPanel and add a parked domain, which sets one of the above to point to the HTML root where I have Drupal installed. While I'm in cPanel I set up a MySQL database and user unique for the new site.
2. Go into the public_html/sites directory, create a directory called "site3-domain.com", copy the default.settings.php file FROM the public_html/sites/default directory into the site3-domain, rename it to settings.php and go to http://site3-domain.com/install.php to start the installation process. While I'm in that directory, I usually create the files directory and give it permissions since in my hosting environment if Drupal creates the directory I usually can't do anything to it until the owner gets changed.
When I'm done I have a directory structure that looks like:
public_html
sites
all
default
site3-domain.com
yetanothersite.com
One change I made in my .htaccess file that came with the Drupal installation is to remove the comment to make www.site3-domain.com and site3-domain.com equivalent, so I don't think about that issue with any site in my multi-site installation.
I think the difference from
I think the difference from your installation, and, therefore, the problem, is that I do not have Drupal installed in the root html, or public_html, directory, but, rather in the subdomain, drupal, so I have
public_html
-----drupal
----------sites
--------------defaultsite.com.site1
--------------defaultsite.com.site2
--------------site3-domain.com
Progress!
Apparently, the problem is with domain parking. Everything I read said "park" it, do not do "addon", for various reasons, including that the address bar would show "defaultdomain.com/site3-domain" rather than "site3-domain.com". Well this, at least with my cpanel setup, is wrong. I deleted the parked domain, added it as an "addon" domain, set the root to public_html/drupal, and now I am getting the install page. And the address bar says "site3-domain.com/install.php".
Also, for anyone who wonders, as I did, if you would still be able to use email addresses for parked and addon domains, the answer is yes. You can at least add forwards, and I believe, though I haven't tried it, that you can add email accounts. That's good. Otherwise, I wouldn't be doing it.
So, now, I have another question, but I'll make that a separate thread.
Thanks.