This module looks like it will do exactly what I need and popped up at just the right time for me. The only problem is that I can't figure out how to use it.
I've got Context, PURL, and Sites all installed. I'm looking to create a "site" at sub.mysite.com. In my apache config I have added "ServerAlias *.mysite.com". I enabled the subdomain modifier in PURL, then saw Sites show up on the main PURL screen with Subdomain selected. I pressed save and this allowed me to enter a subdomain instead of the default domain on the Sites add a site page. Seems like that should do something, so I tried going to sub.mysite.com but all I get is my main site, unmodified.
I'm new to all of these modules. I've used Domain Access before, but now I have all my sites in a multisite config and Domain doesn't seem to work that way. So I was about to set off with figuring out Spaces, Features, Context, etc. but saw this module and it sounds much simpler and more directly aimed at what I'm looking to do. The only thing I can think is that maybe I have to create a context? Or does the module take care of that for me? Like I said, I don't really know how all the support modules for Sites work, so I'm kind of blindly going forward here. Any help would be appreciated!
Comments
Comment #1
brynbellomy commentedHi butler260,
Glad you find the functionality here useful. I've just tested Sites with subdomains and it definitely works. Here's what I did:
1) I set up separate apache VirtualHost directives for each subdomain (one.testbed.local, two.testbed.local), but I'm not sure if this is necessary. It really shouldn't affect Sites, so far as I know, unless apache winds up truncating the wildcard before passing the request to PHP. Try it this way and see if it works for you.
2) Enable subdomain modifiers on PURL.
3) Go to /admin/build/sites and add a site with whatever parameters you'd like
4) Go to /admin/build/context/add and add a Context that switches on when the Site you've just added is active.
5) Easiest thing to test is the "Current site information" block that the Sites module provides. Just go to admin/build/block and make sure the block is enabled globally. You can also test the current Site by setting a different theme on each site. Use the Context Reaction: Theme plugin -- drupal.org/project/context_reaction_theme ... but remember that if you have different themes active on different Sites, you have to enable blocks manually for each theme.
Tell me if you need any more guidance... happy to help!
Bryn
Comment #2
TravieMo9 commentedI have sort of discovered how to use the module. But I'm having a few issues. I have promoted a few nodes to the front pages of the two sites I have added (both of them are domain sites). When I view the front page I can see the teaser but when I click the read more link I am getting permission denied. Also, the name of the main site is affixed to the new sites. How would I change that?
Also, I cannot figure out how Context is supposed to help me. I do not see any way to use it by configuring content types or Taxonomy. I am sure I am missing something. Below was my first post.
My post is along the same line so I am posting it here. Will your module work with Parked Domains or with subdomains only? Also, will I need a directory within the original site's "sites/all/" directory to place the modules and theme for each parked or subdomain (as in original multisite Drupal)?
Comment #3
brynbellomy commentedTravieMo9,
1) As far as the access denied error is concerned, have you set all of the nodes you're trying to access to be available from both sites? If you try to access a node attached to Site 1 using the domain for Site 2, you'll get an access denied. (That's sort of the whole point of this module)
2) As far as the site name issue, I haven't actually added this functionality yet. Oversight on my part. I can do that today or tomorrow, in all likelihood. Right now, the 'site name' text field is just for specifying what name displays for each site in the admin interface.
3) As far as Context integration, the only integration you really get is a Context condition that says "if we are currently on site X, then...". It doesn't affect content types or taxonomy. In fact, the whole point of the Sites module is that you create the appearance and front-end functionality of two or more sites without actually separating anything in the backend. If you use Sites, your content types and vocabularies will be shared across all of your sites (at least in the administrative interface).
4) I'm not sure what you mean when you ask if this module will work on parked domains. Parked domains have no Drupal code on them (or anything else, really, except a splash page from your parking service), so this module has nothing to do with them. Maybe you just mean "domains"? If so, then yes, Sites works on domains, subdomains, and then a variety of elements within the URL after the first "/" slash. For a little more information on this, you can check out the PURL module's d.o page (http://drupal.org/project/purl).
5) You do not need separate "sites/XXXX" folders for each site. In fact, this module is actually a way to get around needing those folders. However, if you want them, the Sites module should still work fine, as long as you don't specify a different database in each settings.php file.
Please tell me if there's anything else I can give you a hand with!
bb
Comment #4
butler360 commentedThanks for your help. Sorry I couldn't get back to your earlier, I got Domain Access working properly (or so I though) and then the site I was using it on promoted other development requirements.
I tried it and it did seem to kick in but with some weirdness. I'll open a new issue to elaborate.
Also, the site name feature mentioned above would be nice to have.
Comment #5
hydra commentedAs this module has not been maintained for some time, I am closing this ticket as “outdated”. A new version of sites which is architecturally and technically unrelated to the Drupal 6 and Drupa 7 versions will be published here soon.
Thank you for your contribution.