Introduction to Domain Access for Drupal 7
0 (0 Likes / 0 Dislikes)
Introduction to Domain Access for Drupal 7
with Addison Berry
There are a number of ways to tackle
managing multiple sites with Drupal.
Sometimes you need to have a separate infrastructure for your site,
but quite often you really only need to be able to control content and/or user access
based on the site domain name where people are coming from.
In this introductory series, we'll learn the basics of how to use the Domain Access module
to use one Drupal site to make it appear that we have multiple sites
while being able to manage them all from one place.
With Domain Access, we'll be able to have one central location
for all of our content and users.
But also, finely control access based on the
URL that someone is accessing the site from.
The example we'll be using is a university that has three sites that they need to maintain.
There's the main university site with two other domains—
one for the alumni site, and then there's also a separate news site.
The university would like to be able
to let people only have one account to access
whatever it is that they need across all three of these domains,
but they still want to be able to control who can create what content on which site.
So for instance, the news site editor
shouldn't be able to manage content on the alumni site.
They would also like to be able to share some of the content that they create
on more than one of the domains or sites.
So perhaps there's a great news article that comes up on the news site,
they'd also like to promote that to the main website home page as well.
Through the course of this series, we're going to learn how to install
and set up Domain Access to accomplish our goals.
We start things off by getting an overview of all the pieces we'll be working with
to make this actually happen.
This includes an overview of the Domain Access module itself,
a review of the Drupal core node access system,
which is the backbone of how Domain Access actually does the job that it needs to do.
And then we're also going to understand how to
work with domain names
on the web server with Apache
virtual host, or they're also called vhosts.
This is necessary because we're going to be working with three different domain names,
and we'll need all three of them to point to one Drupal site
which is where we're going to be setting everything up.
Once we understand these fundamentals, we'll dive into getting our site installed.
First we need to configure our Apache vhosts
so our domains are headed to the right place.
In this process, we'll also actually install the Drupal site.
After the site is installed, we'll get Domain Access installed.
Now we have to do a little bit of tinkering with our settings.php file
in order for Domain Access to work properly.
So we'll be going through that entire process.
With everything installed and ready to go,
we'll add and configure all of our
domains so we can start building out the sites.
We'll start by playing around with the content.
We have some content,
like the About Us page,
that only applies to the main and the news site and say, not the alumni site.
And then we also have some articles that we want to be able to publish across all of the sites.
We'll also look at the Domain Content module that comes with this package
and how that gives us a nice direct user interface
that's going to ease managing all of this content across all of these different domains.
After the content stuff, we'll set up a
few more things that need to be different
between domains using Domain Configuration,
Domain Settings, and Domain Theme modules.
Again, that come with the Domain Access
package that you download.
These will let us configure individual settings like the front page content
and change the alumni site so it
looks noticeably different from the others.
The main reason many people use Domain Access is to have fine grain control over permissions.
To tidy up our hands-on portion,
we'll walk through the various permissions available to us
and explain the differences between Domain Access permissions
and the regular core node permissions and what that does for us.
We're going to go ahead and create some users,
we're going to add and edit a role, and then we're going to set the permissions up
so that authorized users can create content,
but we're going to restrict those users to a particular domain.
For our editors, we'll set it up so that we have an editor that is able to edit and manage content
for only their domains.
But we're also going to have a head editor
that can manage all content regardless of whatever domain it lives on
and will be able to oversee all of those things and change where those domains are.
We'll wrap this series up by looking at
ways that you can extend Domain Access.
We'll review the other modules that come with Domain Access package,
as well as find other contributed modules
that do all kinds of things to integrate with Domain Access.