Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Introduction to Domain Access for Drupal 7

Video loading...

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

Introduction to Domain Access for Drupal 7 Series

Loading...

In this introductory series you will learn how use the Domain Access project to let you manage multiple "sites" with different domain names from just one Drupal installation. Domain Access "multisite" works differently from the core multisite feature in that you truly only have one site to manage. There is just one code base and one database. Domain Access takes advantage of Drupal's node access system to give the illusion of multiple sites. In this series we start off by getting some context through several presentations that explain what Domain Access offers, and why you might use it, how DNS and Apache web servers work, and what you need to understand about the node access system. Once we dive into the hands-on work, you will configure Apache to work with multiple domain names, and get Domain Access installed on your site. Then you will configure a very basic Domain Access site, learning how to share and restrict content, change themes, and set up permissions for fine-grained access control.

Additional resources: 

Domain Access project (drupal.org)