I have multisite working on MAMP where my main drupal instal is at drupal.local and I can get subdomains to work -- such as site1.drupal.local etc. But that's not really what I want and I also don't want the sites to be in subfolders. What I really want is to have one code base with separate independent domain names and I can't find any instructions how to do this. (this surprises me since I would think this is how most people would be managing multiple sites for clients--the sites are not related, so you want separate databases and separate domain names, but you want to avoid reinstalling all of the core files/modules for each website). Is there something different to the instal if you want multiple independent domain names that I'm missing?
Here's what I'd like to have
main installation at:
drupal.local
independent sites:
site1.local
site2.local
I tried creating a directory structure that is Users/myname/Sites/drupal/sites/site1.local/settings.php where Sites is configured as the document root for MAMP, but I cannot access the new site at http://site1.local. It just takes me to my main installation which is the same as http://drupal.local. Can anyone help me with this?
Comments
_
Multisite installations are a bit complex to setup, but they work with separate dbs and independent domain names just fine. You can have a main site named 'www.site.com' in the root public_html folder and 'www.someotherdomainname.com' installed at 'public_html/sites/www.someotherdomainname.com' no problem. There quite literally TONS of info and step by step writeups on this. Part of the reason it's so complex is because the details of configuration vary greatly based on host environment, but I would start at Advanced and multisite installation in the handbooks.
Worldfallz -- I've pretty
Worldfallz --
I've pretty much already read everything I could find, along with the link that you sent. Perhaps I'm missing something, but they all seem to be instructions for setting up site1.example.com (subdomain) or example.com/site1 (subdirectory). I haven't seen anything that specifically talks about if there's a difference between setting up multisites with the url structure site1.com site2.com. If what you are saying is correct, then it's basically the same installation either way, but I've tried this and can't get it to work on my MAMP server. Like I said, I have it working with subdomains, but it doesn't work for me with independent domain names. So I suspect the configuration must be different in this case.
If you have any specific instructions for what I could try differently, please let me know.
_
drupal doesn't care what the folder in the sites/ directory is named so, from a drupal perspective, the setup and configuration is the same regardless if the site is subdomain, domain, or subfolder. My guess is it's the webserver/htaccess configuration that's giving you problems-- but I'm no guru and I don't have a mac handy. I can only tell you that on linux and windows with apache the documentation I linked worked for me. The key point I see people having problems with over and over again is making sure the webserver points all sites to the root of the main drupal install (not the multisite site). Sorry that's not more helpful.
Multisite with different domains
Hi,
This page http://drupal.org/node/238805 explains how to configure your hosts file and httpd.conf files to set up multiple local domains pointing at one codebase. The main difference if you're using MAMP is that you don't modify the Mac OSX system httpd.conf file, but the one in /Applications/MAMP/conf/apache/
Edit -- I finally got it
Edit -- I finally got it working with a separate domain name, and I didn't have to modify any of my configuration. I did swap out the settings.php file with another, so maybe the one I was using was corrupted. Thanks for the help.
subdomain to subdirectory gives wrong alias, or broken links
Hi there,
I posted this question here as well: http://drupal.org/node/824018, not sure this is the right place?
This might be a simple one for the subdomain experts. I have two Drupal installations/websites running on the same webserver. One is a public website, which runs on the root www directory, the other one runs from a subdirectory. Via the webhost's control panel we forward a subdomain (like subdomain.domain.com) to the subdirectory (to domain.com/subdirectory). My question is about the website in the subdirectory, and the wrong url alias it generates in my opinion... Because when accessing the site via subdomain.domain.com all the url aliasses (and hyperlinks/menu items) still have the subdirectory in it, like 'subdomain.domain.com/subdirectory/content-title'. I would like it to be 'subdomain.domain.com/content-title', without the subdirectory being mentioned...
The subdirectory Drupal installation seems to find that it's baseurl is subdomain.domain.com/subdirectory, instead of just subdomain.domain.com. When I try to change this in settings.php by setting the base_url variable to subdomain.domain.com, the url aliasses are like I want them to be, and even menuitems are functioning correctly, but all the links to css files, images etc. are broken. Drupal seems to search for these files in the wrong place when it's trying to open an image like subdomain.domain.com/sites/all/themes/themename/logo.png. The file can only be opened at subdomain.domain.com/subdirectory/sites/all/themes/themename/logo.png. What I am doing wrong here? Strange right?
I thought it might have something to do with http://www.fractalomega.com/node/1 and http://drupal.org/node/37645 but I'm not sure.
Hope someone can help me out here! Thanks!