By adavidow on
I feel most clueless. I want to have several sites hosted from one drupal installation. So, I have set up the new sites, each with its own setup, as in
sites
mysite.com.foo
settings.php sets base URL to http://mysite.com/foo
themes
foo_specialtheme
mysite.com.bar
settings.php sets base URL to http://mysite.com/bar
themes
bar_specialthemeBut, if I try to go to http://mysite.com/bar, for instance, all I get is a "page not found". If I add a page and give it the short url "bar", that's fine, but what is my equivalent, then, of promoting to the front page? If I try to add a special theme to that location, when I go to administer themes, I see only the general themes, not the one in the themes folder for that folder.
What might I be doing wrong? Is there more settup that I am missing?
Comments
er, and database foo?
It looks like, if I were using multisite, I still need to set up separate database tables for each site - correct?
So, is this the right solution? Would I be better off using og or some such? Then I still would have all the themes in the usual one place, and assign the theme using the og configuration for each group?
That would take me a long way towards where I need to be right now, but would still leave the question of where pages appear - how do I assign them to specific groups?
I am using Drupal 4.6.6.
Park the domains
From your hosts control panel you should be able to "park" the domain you want on the main installation. For parking subdomians or folders you may need assistance from your host. Once they are parked on it you just need to add copy your "default" file in the "sites" directory and name it what ever your new domain is. Then you update the settings.php file in that directory with the correct settings, i.e. domain name and database.
All in the handbook.
parking domains is not an issue
We have our own servers and control our own DNS. Parking the domains is not the issue. I'm not sure what the issue is at this point, just that I haven't gotten things to work as expected.
What I hoped would be possible was to have one codebase, but to be able to point to specific locations, either as sites, or using og such that each has a specific homepage and theme (and items such as "comment" would use the relevant theme).
by way of supersimple example, on my local windows machine, it seems that I should be able to install drupal and set up local sites
But so far, I haven't been able to get the expected behavior - either I am doing this all wrong, or I simply don't understand what I should be seeing.
Multi-site Directories
The directory setup in you first example and your second examples are different. I'm no expert on multisite, but after months of making mistakes I did get it to work, ha ha ha. I don't think the additional sites should be inside your default directory. Might be the case that Drupal can't find them there.
This is how I set it up:
I kinda got the concept better when I discovered that Drupal will find your sites without a "default" directory in your "sites" directory. I don't know about unanticipated consequences so I left the "default" directory in the "sites" directory, but I'm not using it for any sites.
If it were me, I'd keep it simple and leave og out of the picture until you get solid with the multisite concepts. For me, keeping it simple has also meant using a seperate database for each site for now.
Thinking back on all of my mistakes, the "page not found" error does seem to suggest a domain issue. If the directory setup is not the issue, I'd wonder if you really have your domains pointed at the Drupal installation directory. The handbook is vastly imporved regarding multi-sites. Check it out. I do hope you don't have to wade through that rats nest of posts about symlinks.
Good Luck. It will be gratifying when you get there.
Paul
You are correct
And what I showed is a typo - I do have everything in its own directory, on the same level as default - same model as you just showed. Thanks for catching that.
I'd rather not use a separate database for each site, though. Not only would that preclude sharing content, but it is effectively doing a separate install of drupal for each site. Lots of extra administrativa, no?
Also, the INSTALL.TXT file indicates that custom themes and custom modules go inside folders named "themes" and "modules" inside the individual site - see my first example, above.
little confused
I'm not sure exactly what you are going for, but there is great documentation in the handbook. It's mostly just a matter of creating new "sites" configuration files for each domain. You can have them all use the same database, different ones, or parts of multiple databases.
It's hard to tell what you actually want to achieve
But it sounds like you want some sort of subsection deal going on with lots of shared 'bits'.
Multisite is not so much intended for that scenario - it's purpose is to be able to run multiple Drupal instances (sites) from the same codebase (ie ones set of files to patch etc). It is equivalent to the concept of one web server running multiple web sites.
Although Drupals flexibility means that people have been able to get some of these instances sharing database tables and therefore content and/or users - there are disadvantages in terms of lots more issues to work out and harder upgrades etc. The only real reason IMO to take that approach is when you absolutely have to use multiple modules that conflict with each other - the node based access control ones being a good example. Although there are efforts underway to solve that problem as well.
If you just want subsections in your site, you will be better off trying to do that within one Drupal instance I reckon.
--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal
Multisite vs. say, OG
So, you're saying that multi-site setups don't mind the extra databases - what matters is the drupal codebase and being able to sanely maintain =that= code in one place. That's fair. Although it seems like what I'm trying to do should still work.
I guess I'll go back to poking around og and see what I'm missing in terms of making it work.
here is an example
a real world example ozmotorsport.com.au pcaa.com.au and natoliracing.com all run off the same installation of drupal with the same database in mysql....the tables are just prefixed...is this what you are after???