Hi people
I posted about this initially at http://drupal.org/node/285941 in the "before you start" forum, & wolfflow suggested I copy my question here too.
I'm still at a stage of not being sure if Domain Access is relevant for my plans, so the version number attached to this post was somewhat arbitrary (it wouldn't let me not pick one). In fact, part of what I'm trying to establish is to confirm that Drupal as a whole can do what I want at all, though I realise that goes a bit off topic for this particular forum section.
The relevance of DA may hinge on what counts as content, for the purposes of "sharing content". I probably don't really need to share content content (so to speak - I mean articles etc) although it might be useful occasionally, but what I definitely do want to share if possible is taxonomy. Possibly some menus too.
Anyway, original explanation below - all comments welcome. Thanks for reading!
=======
Hello all!
I'm wondering how feasible it might be to do what I want to do.
I've got several different projects, which each have their own domain names. But there are connections between them. E.g. a page on www.blue.co.uk (made-up name for the sake of illustration) might have a topic in common with a page on www.green.co.uk.
Currently, most of it is on plain HTML. But recently I started considering using Drupal for an overhaul of one of the sites.
Then, as I've been checking out Drupal, it's occurred to me that there would be advantages to having both www.blue.co.uk and www.green.co.uk being served from one install, using some version of URL mapping. That way, they could both share some Drupal taxonomy vocabularies. Then e.g. if someone came to www.green.co.uk and found something they liked, they could click on the taxonomy tag for that topic, and the results listing would include things from the "blue" site too. That strikes me as v cool :-)
I've been searching around and reading round the subject quite a bit, and I've seen the Domain Access project,
http://drupal.org/project/domain
but not yet discovered anything exactly (reassuringly :-) ) the same as what I want to do.
Couple of specific questions:
1. Would Drupal (and mod_rewrite if appropriate) give me the control I want over the addressing?
so e.g.1
www.blue.co.uk/blue-idea/essay-about-blue/
and
www.green.co.uk/green-idea/essay-about-green/
could both be canonical addresses,
and e.g.2 (possibly more tricky)
www.blue.co.uk/shared-idea/first-essay/
and
www.green.co.uk/shared-idea/second-essay/
could both be canonical addresses?
2. Thinking about the practical structure, I have a question about which bit of the underlying Drupal site I'd be best off mapping the other sites onto (if that's how it would work).
I could imagine
www.red.co.uk/blue/
and
www.red.co.uk/green/
being used as the underlying "real" locations for blue and green, with red really where it appears to be. Would that be sensible or silly? Pros and cons? Or have I misunderstood how it would work anyway?
In general, I'm also interested in any kind of musings on "Best way to do this kind of thing if there's more than one way".
I don't have compelling reasons yet to pick Drupal 5.x or 6.x.
Thanks in advance for any clues!
Jennifer
Comments
Comment #1
socialnicheguru commentedsubscribing
Comment #2
agentrickardI don't have time to dig into this right now, but will leave it open for others.
Comment #3
Garrett Albright commentedWith regard to Point 1, maybe I'm not entirely sure what you're asking, but Drupal supports assigning an arbitrary URL to any of your content, so paths like that (minus the trailing slash) are totally possible, both with Domain Access and without. As for having part of one essay on one site and part of another essay on the other… I'm not sure why you would want to do that, but that is possible as well with Domain Access. Automatically making each essay part aware of the other part's existence and automatically link to it is where it possibly gets tricky, unless you specify that that content should be shared among all domains and use a content pagifying module (I've never had use for one myself, but I bet one exists).
With regard to Point 2, with Domain Access anyway, there is only one "real" Drupal installation, and it would be at one of the "live" sites. So in your case, Drupal might really live at http://www.green.co.uk , and http://www.blue.co.uk will point to http://www.green.co.uk -- but then, when accessed through the blue domain, Domain Access kicks into action and has Drupal output different content.
I'm still new to Domain Access as well, but that's the way I understand things at this point. I'm sure Rickard will correct me if I'm wrong.
As for choosing between D5 and D6, if you don't need any major modules which are still D5-only (like Übercart), I would highly recommend starting with D6. It will be better supported in the future, of course, but some of the features it has now that D5 doesn't are really slick, like the ability to drag menu items and such to rearrange them instead of fiddling with "Weight" menus. And the new version of the Views module, which is D6-only, is absurdly slick once you wrap your head around it.
Comment #4
agentrickardIn the case of Domain Access, you do all the DNS work at the server level. Simply make a single Drupal installation at your 'primary domain' -- here, example.com. Then point DNS records for any (or all) domains you wish at that directory.
Then you 'register' those domains with Domain Access, and it handles the rest. You only need one settings.php file, one set of code, and one database.
So, for instance, you have the following:
This webserver has the IP of 127.0.0.1.
In your host DNS record, simply point all domains at that IP. On my testing machine, I do that through the 'hosts' file on Apache2.
You can also configure wildcard DNS. In any case, requests made to domains not recognized by Domain Access will be redirected to the primary domain.
I am not, however, a sysadmin, so I cannot tell you how to congifure these options. Also not that many shared hosts will not support what you need.
Comment #5
Garrett Albright commentedTo clarify what agentrickard said, your hosts file is part of your operating system, not Apache (or some other web server). It basically provides a cache of domain name to IP address mappings that the network stack of your OS checks first before it goes to the internet and hits up a DNS server to figure out what IP address it should look for when you ask it to access a domain name. I would not recommend putting real domain names in your hosts file and pointing them back to your local IP address (127.0.0.1 in the example above) because then, whenever you try to access example.com, you won't be able to access the "real" one on the internet; you'll always be hitting up the one on your local computer instead. A good idea is instead to use fake, impossible domain names like example.test instead.
http://en.wikipedia.org/wiki/Hosts_file
Setting up virtual hosts through Apache is another important issue. Info on that can be found here:
http://httpd.apache.org/docs/2.2/vhosts/
In my case, I'm working on a site whose main domain is going to be at foo.org, but who will be using Domain Access to also host bar.com (real domain names substituted, obviously -- older versions of this site, not using Drupal, are currently on the internet). On my local machine, I'm keeping the files for this project in /Users/Albright/Sites/foo, but I have other sites in /Users/Albright/Sites which I want to keep working as well. My Apache configuration file (httpd.conf) has this at the end:
And I've added this to my hosts file:
I then configured foo.test and bar.test in DA. Everything works great. Of course, when I move the system to the live server, I'm going to have to reconfigure things to work with foo.org and bar.com instead, but I don't anticipate that being too much of a problem.
If you are confused, don't worry; I'm learning a lot of this as I'm going along myself.
Comment #6
agentrickard:-) As I said, I am not a sysadmin. These are very useful notes.
NOTE: 5.x.1.5 now supports non-standard ports as separate domains.
Comment #7
Garrett Albright commentedIncidentally, Rickard, I think it would be great if you made it clear in DA's docs that it works equally well (or has for me so far, at least) on entirely separate domain names as opposed to just subdomains. The example you link to (wheretraveler) only uses subdomains, and almost all of the examples in the documentation (which is otherwise really great, by the way; kudos) use subdomains. Because of this, I wasn't expecting DA to work for my needs when I first tried it. It was a pleasant surprise to see that it does.
Comment #8
agentrickardSee section 1.5.1 of the README and the top of the module description page.
But you want something like:
[Rickard, btw, is my family name.]
Comment #9
Garrett Albright commentedOops! Sorry, Mr Rickard… Ken. No disrespect meant.
Yes, some examples where non-*example.com domains were listed would have helped clue me in. There is 1.5.1, but that's offset by the introduction and 2.2, where only *example.com examples are used.
(New release today, I see… I'll go snag it.)
Comment #10
agentrickardIt's ok, a lot of non-native English speakers assume Rickard is my first name, since it is common in Scandanavia.
Comment #11
Jennifer_M commentedThanks Garrett & Ken!
First to clarify:
Sorry, didn't explain that quite clearly enough. No, what I want to do would be more like:
Suppose one site sells printed T shirts, and another site sells books. (And suppose good enough reasons of presentation/promotion for keeping the two sites on different domain names.)
A hypothetical T shirt on the T-shirt site, saying "Linux geek", would be tagged "Linux". On the book site, there would also be books about Linux, with the same tag.
Now imagine a visitor to the book site, looking at one of the Linux books. If the visitor clicked on the Linux tag, I'd like the Linux T-shirt page to appear in their ("taxonomy"-generated) search results too, along with any other relevant books (the T shirt line possibly in a different colour in the search result listing, or something).
The point of it would be a kind of cross-promotion thing - "If this is a theme you're interested in, you might like this other thing too, even though it's from a different site".
(It's not actually books and T shirts, but I think that might make clearer what I mean...)
::grins::
Not so much confused exactly as, shall we say, "fully aware of the dimensions of my ignorance" ::laughing to myself here::
My situation feels like: I'm near the bottom of several steep learning curves (including Drupal itself and mod_rewrite, as well as Domain Access and its hosting implications), rather cautious and wary about the possibility of spending ages plodding upwards, only to arrive at the top and find I picked the wrong curve :-)
if you know what I mean! :-)
I'm thinking now that perhaps the most useful info at this point would be: So if, using Drupal, I wanted to do that thing described above using the books/T-shirts example (if that was clear), is it possible without Domain Access?
(you see if I know for sure I would need Domain Access to do it, I'm then kind of "safe" to invest more time in getting my head round the details of how Domain Access works - which I'm reluctant to do if it's then going to turn out I don't need it after all.)
so yeah let's narrow my question down to that for now!
thanks again...
Jennifer
Comment #12
Garrett Albright commentedThere's lots of ways it could be done without DA, but I think DA might be the easiest. You could do something with Views where, on the shirt site, shirts would show up in the main content area, but maybe there's a block to the side which is showing books on the same topic. And vice versa for the book site. I'm speaking theoretically here, but I think something like that would be possible without custom module development.
By the way, you say you're encountering a learning curve with mod_rewrite -- do you have some special case going on where the rules that come in Drupal's default .htaccess file are insufficient? I've never run into a case like that before. (Or are you getting mixed up with the hosts file thing?)
Comment #13
Jennifer_M commentedAny chance you could elaborate on this? How would I do it without DA, and why would DA be easier? if that's not too much to ask.
re mod_rewrite: no, it's just another area of which I want to have a better understanding. You know how, when you really know your way round some bit of technology, it can give you ideas of "aha I could do this"? I want to be more at that familiar stage with mod_rewrite, whereas now I'm at the stage of looking up how to do specific mappings as and when they become necessary. (Though, actually, it was premature to put that under the umbrella of steep learning curves, 'cause I'm not far enough up it to know - maybe it's all easy when you start looking :-) )
Comment #14
Garrett Albright commentedWell, what comes to mind in terms of doing it without DA is to set up a multi-site Drupal install using Drupal's standard multi-site capability, so that it functions more like you have two separate Drupal installs. Then you hack together a custom module which, when the shirt database is viewed, it sneaks over across tables (and possibly databases, depending on how you set it up) and looks up results in the book table too. Or maybe you really do have two separate Drupal installs (maybe even on two separate servers), and you use XMLRPC or some other sort of cross-site scripting to fetch results from the other server as the user searches -- this could be done client- or server-side. But I think both of these solutions are kludgey when you can use DA instead and (probably) do something like this without even doing any custom module development.
As for mod_rewrite, I worry about it about as much as Drupal makes me worry about it -- which is not at all. (And that's just fine with me, because I'm of the personal opinion that Apache's configuration file syntax was devised by a sadist.) As you're learning Drupal, I would suggest you worry about it exactly that same amount. There are plenty of other things more deserving of worry.
Comment #15
agentrickardComment #16
Jennifer_M commentedWell I've pondered the pros and cons and I think what I'm actually going to do is keep it simple, and just have the different web sites on separate Drupals, and put in some cross-links manually. Because the automatic cross-linkage isn't really a need, just an "ooh that would be cool", so it would be "sledgehammer to crack a nut" for the extra complexity it would require (esp as I do currently have shared hosting).
I realised it was even possible that there might be situations sometimes where having the pages related automatically wasn't what I wanted, and having a manual selection gave me more flexibility.
So as far as this thread is concerned, it's "job done" :-)
Thanks for your help in figuring it all out!
Comment #17
agentrickardSounds like solid reasoning to me. Good luck!
Comment #18
David Naian commentedHi @Jennifer_M,
excuse my short or late step in in this. Anyway if you would like to know more about Domain Access and one of the way we did implement you can have a look at
http://adaccs.at. The site is still under heavy development and not all permissions issue are cleared out and set in the manner we want to, and we also need a lot of feedback
as to have an idea where we did customize wrong and where it look ok.
Cheers