SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Multisite & Single Sign On
              by
        Ipsita Mishra
Who am I?


                  Ipsita Mishra
         http://drupal.org/user/172344
                 IRC Nick: ipsita


Currently working for Melity Inc in association with PCI Hyderabad
We will walk through


         What is Multisite?


       How to setup Multisite


Sharing information between Multisite
WWW

What is multisite ?
 Using a single drupal installation(code base) for creating
 multiple site.

Why go for it?


What is assumed?
WWW

What is multisite ?
 Using a single drupal installation(code base) for creating
 multiple site.

Why go for it?
Shared codebase means all sites are using the same
version(latest version, probably). Better server(site)
management, less complex version control system, less
management for Security Issues.


What is assumed?
WWW
What is multisite ?
 Using a single drupal installation(code base) for creating
 multiple site.

Why go for it?
Shared codebase means all sites are using the same
version(latest version, probably). Better site management, less
complex version control system, less management for Security
Issues.

What is assumed?
 You have basis knowledge of Apache server configurations &
 default drupal folder structure.
Mutlisite vs. Multiple sites

  www.example.com                                         www.example.com


                                           Drupal Code

www.example.com/site1        Drupal Code
                                                         www.example.com/site1


                                           Drupal Code
www.example.com/site1


                                                           site2.example.com

        Still we can keep 
       uniqueness of each                  Drupal Code
                site
Mutlisite vs. Multiple sites




Credit : This is a snapshot from the Video on Multisite by Matt Petrowsky 
Multisite Structure
Multisite Structure
What is Virtual host?

The term Virtual Host refers to the practice of
 maintaining more than one server on one machine, as
 differentiated by their apparent hostname. -
 apache.org

Virtual hosting is a method for hosting multiple domain
 names on a computer using a single IP address. This
 allows one machine to share its resources, such as
 memory and processor cycles, to use its resources
 more efficiently. - Wikipedia
localhost


/etc/apache2/sites-available/default

The `default` file is read when we type
http://localhost in our browser

         vhost (an example file)
 /etc/apache2/sites-available/news.example.com
A Sample Virtualhost Configuration
Drupal lookup for settings.php

Our website: friends.example.com

Drupal will search for configuration files in the following
order, using the first configuration it finds:

sites/friends.example.com
sites/example.com
sites/default
Drupal lookup for settings.php

Lets take a complex example :
 www.sub.example.com/site3

Drupal will not read configuration from

sites/sub
sites/site3
Drupal lookup for settings.php

When searching for a site configuration (for example
  www.sub.example.com/site3), Drupal will search for
configuration files in the following order, using the
first configuration it finds:

sites/www.sub.example.com.site3/settings.php
Drupal lookup for settings.php

When searching for a site configuration (for example
  www.sub.example.com/site3), Drupal will search for
configuration files in the following order, using the
first configuration it finds:

 sites/www.sub.example.com.site3/settings.php
 sites/sub.example.com.site3/settings.php
Drupal lookup for settings.php

When searching for a site configuration (for example
  www.sub.example.com/site3), Drupal will search for
configuration files in the following order, using the
first configuration it finds:

 sites/www.sub.example.com.site3/settings.php
 sites/sub.example.com.site3/settings.php
 sites/example.com.site3/settings.php
Drupal lookup for settings.php

When searching for a site configuration (for example
  www.sub.example.com/site3), Drupal will search for
configuration files in the following order, using the
first configuration it finds:

 sites/www.sub.example.com.site3/settings.php
 sites/sub.example.com.site3/settings.php
 sites/example.com.site3/settings.php
 sites/www.sub.example.com/settings.php
Drupal lookup for settings.php

When searching for a site configuration (for example
  www.sub.example.com/site3), Drupal will search for
configuration files in the following order, using the
first configuration it finds:

 sites/www.sub.example.com.site3/settings.php
 sites/sub.example.com.site3/settings.php
 sites/example.com.site3/settings.php
 sites/www.sub.example.com/settings.php
 sites/sub.example.com/settings.php
Drupal lookup for settings.php

When searching for a site configuration (for example
  www.sub.example.com/site3), Drupal will search for
configuration files in the following order, using the
first configuration it finds:

 sites/www.sub.example.com.site3/settings.php
 sites/sub.example.com.site3/settings.php
 sites/example.com.site3/settings.php
 sites/www.sub.example.com/settings.php
 sites/sub.example.com/settings.php
 sites/example.com/settings.php
Drupal lookup for settings.php

When searching for a site configuration (for example
  www.sub.example.com/site3), Drupal will search for
configuration files in the following order, using the
first configuration it finds:

 sites/www.sub.example.com.site3/settings.php
 sites/sub.example.com.site3/settings.php
 sites/example.com.site3/settings.php
 sites/www.sub.example.com/settings.php
 sites/sub.example.com/settings.php
 sites/example.com/settings.php
 sites/default/settings.php
Single Sign On(SSO)

SSO means when you created a user/pass on
one site, it will work on the other site(s)
Single Sign On(SSO)

SSO means when you created a user/pass on
one site, it will work on the other site(s)

These sites will share session and user-related
tables so once users login to one of the sites, they
will auto login to the other site without logging in
exclusively.
Single Sign On(SSO)

SSO means when you created a user/pass on
one site, it will work on the other site(s)

These sites will share session and user-related
tables so once users login to one of the sites, they
will auto login to the other site without logging in
exclusively.

In addition to that, we can share User roles and
profiles among the two sites.
Prepare database and user(for SSO)




         # DB name: drupal_db
         # DB username: duser
          # Password: duserp
Modify settings.php

Open settings.php in the folder

sites/news.example.com/

$db_url = 'mysql://username:password@localhost/databasename';

change it to,

$db_url = 'mysql://duser:duserp@localhost/drupal_db';
Modify settings.php : $db_prefix

We have a variable called “$db_prefix” which will
do the magic


Since we want to share a database among two
sites but not completely, we decide which tables
to share / not to share.
Modify settings.php : $db_prefix


$db_prefix = array(
'default' => 'news_',
'users' => 'shared_',
'sessions' => 'shared_',
'role'   => 'shared_',
'authmap' => 'shared_',
'users_roles' => 'shared_',
);
Now edit the settings.php file for
sites/sn.example.com
Use the same database connection information.

$db_url = 'mysql://duser:duserp@localhost/drupal_db';
Then, you add an array of prefixes, which will look like:
$db_prefix = array(
'default' => 'sn_',
'users' => 'shared_',
'sessions' => 'shared_',
'role'   => 'shared_',
'authmap' => 'shared_',
'users_roles' => 'shared_',
);
Install drupal



http://news.example.com/install.php


 http://sn.example.com/install.php
SSO for two websites with 2 database



An option : Multisite Login Module

# Using a multisite installation.
# Using a separate database for each site (no table prefixing,
though the code could be modified to allow for this).
# Share the users table across all sites (If this is not you, what
are you hoping that this module will do for you?)
# You need to install the Multisite Api module.
Resources



http://drupal.org/getting-started/6/install/multi-site
http://gotdrupal.com/videos/multisites-vs-multiple-sites
http://groups.drupal.org/multisite
Thank you

Contenu connexe

Tendances

TriDUG WebFM Presentation
TriDUG WebFM PresentationTriDUG WebFM Presentation
TriDUG WebFM Presentationcgmonroe
 
Drupal in 30 Minutes
Drupal in 30 MinutesDrupal in 30 Minutes
Drupal in 30 MinutesRobert Carr
 
Drupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalDrupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalAlozie Nwosu
 
Archiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your contentArchiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your contentPeter Keung
 
Integrating Files Into Drupal 7 Authoring Workflow
Integrating Files Into Drupal 7 Authoring WorkflowIntegrating Files Into Drupal 7 Authoring Workflow
Integrating Files Into Drupal 7 Authoring WorkflowMatt Mendonca
 
Drupal Installation & Configuration
Drupal Installation & ConfigurationDrupal Installation & Configuration
Drupal Installation & ConfigurationAnil Mishra
 
Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2Marcus Deglos
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingAshok Modi
 
Scotty, I need more speed - Koha tuning
Scotty, I need more speed - Koha tuningScotty, I need more speed - Koha tuning
Scotty, I need more speed - Koha tuningGalen Charlton
 
WordPress Theme & Plugin development best practices - phpXperts seminar 2011
WordPress Theme & Plugin development best practices - phpXperts seminar 2011WordPress Theme & Plugin development best practices - phpXperts seminar 2011
WordPress Theme & Plugin development best practices - phpXperts seminar 2011Tareq Hasan
 
Sanjip Shah: Internationalizing and Localizing WordPress Themes
Sanjip Shah: Internationalizing and Localizing  WordPress ThemesSanjip Shah: Internationalizing and Localizing  WordPress Themes
Sanjip Shah: Internationalizing and Localizing WordPress Themeswpnepal
 
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesGerald Villorente
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?Thava Alagu
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1MySQL for Beginners - part 1
MySQL for Beginners - part 1Ivan Zoratti
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drushkbasarab
 

Tendances (20)

TriDUG WebFM Presentation
TriDUG WebFM PresentationTriDUG WebFM Presentation
TriDUG WebFM Presentation
 
Drupal in 30 Minutes
Drupal in 30 MinutesDrupal in 30 Minutes
Drupal in 30 Minutes
 
Drupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalDrupal Now! - Introduction to Drupal
Drupal Now! - Introduction to Drupal
 
Archiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your contentArchiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your content
 
Integrating Files Into Drupal 7 Authoring Workflow
Integrating Files Into Drupal 7 Authoring WorkflowIntegrating Files Into Drupal 7 Authoring Workflow
Integrating Files Into Drupal 7 Authoring Workflow
 
Drupal Installation & Configuration
Drupal Installation & ConfigurationDrupal Installation & Configuration
Drupal Installation & Configuration
 
Php basics
Php basicsPhp basics
Php basics
 
Drupal Camp Melbourne
Drupal Camp MelbourneDrupal Camp Melbourne
Drupal Camp Melbourne
 
Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
Scotty, I need more speed - Koha tuning
Scotty, I need more speed - Koha tuningScotty, I need more speed - Koha tuning
Scotty, I need more speed - Koha tuning
 
WordPress Theme & Plugin development best practices - phpXperts seminar 2011
WordPress Theme & Plugin development best practices - phpXperts seminar 2011WordPress Theme & Plugin development best practices - phpXperts seminar 2011
WordPress Theme & Plugin development best practices - phpXperts seminar 2011
 
Sanjip Shah: Internationalizing and Localizing WordPress Themes
Sanjip Shah: Internationalizing and Localizing  WordPress ThemesSanjip Shah: Internationalizing and Localizing  WordPress Themes
Sanjip Shah: Internationalizing and Localizing WordPress Themes
 
Drupalcampatl d7
Drupalcampatl d7Drupalcampatl d7
Drupalcampatl d7
 
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, Terminologies
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1MySQL for Beginners - part 1
MySQL for Beginners - part 1
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drush
 

En vedette

Inside OpenChange scalable architecture
Inside OpenChange scalable architectureInside OpenChange scalable architecture
Inside OpenChange scalable architectureJulien Kerihuel
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)Phase2
 
The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"Phase2
 
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8Phase2
 
3 Tips for a Successful Ektron to Drupal Conversion
3 Tips for a Successful Ektron to Drupal Conversion3 Tips for a Successful Ektron to Drupal Conversion
3 Tips for a Successful Ektron to Drupal ConversionAcquia
 
A Future-Focused Digital Platform with Drupal 8
A Future-Focused Digital Platform with Drupal 8A Future-Focused Digital Platform with Drupal 8
A Future-Focused Digital Platform with Drupal 8Acquia
 
Omnichannel For Government
Omnichannel For Government Omnichannel For Government
Omnichannel For Government Phase2
 

En vedette (7)

Inside OpenChange scalable architecture
Inside OpenChange scalable architectureInside OpenChange scalable architecture
Inside OpenChange scalable architecture
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)
 
The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"
 
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
 
3 Tips for a Successful Ektron to Drupal Conversion
3 Tips for a Successful Ektron to Drupal Conversion3 Tips for a Successful Ektron to Drupal Conversion
3 Tips for a Successful Ektron to Drupal Conversion
 
A Future-Focused Digital Platform with Drupal 8
A Future-Focused Digital Platform with Drupal 8A Future-Focused Digital Platform with Drupal 8
A Future-Focused Digital Platform with Drupal 8
 
Omnichannel For Government
Omnichannel For Government Omnichannel For Government
Omnichannel For Government
 

Similaire à Drupal Multisite Setup

Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management SystemsMatthew Turland
 
Big data with HDFS and Mapreduce
Big data  with HDFS and MapreduceBig data  with HDFS and Mapreduce
Big data with HDFS and Mapreducesenthil0809
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansibleahamilton55
 
Drupal Deployment Troubles and Problems
Drupal Deployment Troubles and ProblemsDrupal Deployment Troubles and Problems
Drupal Deployment Troubles and ProblemsAndrii Lundiak
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesExove
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sitesdrupalcampest
 
Domain Access Module
Domain Access ModuleDomain Access Module
Domain Access ModuleRyan Cross
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceAshok Modi
 
ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON Padma shree. T
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAJesus Manuel Olivas
 
Slick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon LondonSlick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon LondonPhase2
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011Alfred Ayache
 
Big data interview questions and answers
Big data interview questions and answersBig data interview questions and answers
Big data interview questions and answersKalyan Hadoop
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments Ohad Raz
 

Similaire à Drupal Multisite Setup (20)

Drupal Multi-site for Fun and Profit
Drupal Multi-site for Fun and ProfitDrupal Multi-site for Fun and Profit
Drupal Multi-site for Fun and Profit
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management Systems
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Big data with HDFS and Mapreduce
Big data  with HDFS and MapreduceBig data  with HDFS and Mapreduce
Big data with HDFS and Mapreduce
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Dc kyiv2010 jun_08
Dc kyiv2010 jun_08Dc kyiv2010 jun_08
Dc kyiv2010 jun_08
 
Drupal Deployment Troubles and Problems
Drupal Deployment Troubles and ProblemsDrupal Deployment Troubles and Problems
Drupal Deployment Troubles and Problems
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Domain Access Module
Domain Access ModuleDomain Access Module
Domain Access Module
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON ACADGILD:: HADOOP LESSON
ACADGILD:: HADOOP LESSON
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
 
Apache
ApacheApache
Apache
 
Slick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon LondonSlick Data Sharding: Slides from DrupalCon London
Slick Data Sharding: Slides from DrupalCon London
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
Big data interview questions and answers
Big data interview questions and answersBig data interview questions and answers
Big data interview questions and answers
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
A Practical Multi-Tenant Cluster
A Practical Multi-Tenant ClusterA Practical Multi-Tenant Cluster
A Practical Multi-Tenant Cluster
 

Dernier

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Dernier (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Drupal Multisite Setup

  • 1. Multisite & Single Sign On by Ipsita Mishra
  • 2. Who am I? Ipsita Mishra http://drupal.org/user/172344 IRC Nick: ipsita Currently working for Melity Inc in association with PCI Hyderabad
  • 3. We will walk through What is Multisite? How to setup Multisite Sharing information between Multisite
  • 4. WWW What is multisite ? Using a single drupal installation(code base) for creating multiple site. Why go for it? What is assumed?
  • 5. WWW What is multisite ? Using a single drupal installation(code base) for creating multiple site. Why go for it? Shared codebase means all sites are using the same version(latest version, probably). Better server(site) management, less complex version control system, less management for Security Issues. What is assumed?
  • 6. WWW What is multisite ? Using a single drupal installation(code base) for creating multiple site. Why go for it? Shared codebase means all sites are using the same version(latest version, probably). Better site management, less complex version control system, less management for Security Issues. What is assumed? You have basis knowledge of Apache server configurations & default drupal folder structure.
  • 7. Mutlisite vs. Multiple sites www.example.com www.example.com Drupal Code www.example.com/site1 Drupal Code www.example.com/site1 Drupal Code www.example.com/site1 site2.example.com Still we can keep  uniqueness of each  Drupal Code site
  • 8. Mutlisite vs. Multiple sites Credit : This is a snapshot from the Video on Multisite by Matt Petrowsky 
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. What is Virtual host? The term Virtual Host refers to the practice of maintaining more than one server on one machine, as differentiated by their apparent hostname. - apache.org Virtual hosting is a method for hosting multiple domain names on a computer using a single IP address. This allows one machine to share its resources, such as memory and processor cycles, to use its resources more efficiently. - Wikipedia
  • 17. localhost /etc/apache2/sites-available/default The `default` file is read when we type http://localhost in our browser vhost (an example file) /etc/apache2/sites-available/news.example.com
  • 18. A Sample Virtualhost Configuration
  • 19. Drupal lookup for settings.php Our website: friends.example.com Drupal will search for configuration files in the following order, using the first configuration it finds: sites/friends.example.com sites/example.com sites/default
  • 20. Drupal lookup for settings.php Lets take a complex example : www.sub.example.com/site3 Drupal will not read configuration from sites/sub sites/site3
  • 21. Drupal lookup for settings.php When searching for a site configuration (for example www.sub.example.com/site3), Drupal will search for configuration files in the following order, using the first configuration it finds: sites/www.sub.example.com.site3/settings.php
  • 22. Drupal lookup for settings.php When searching for a site configuration (for example www.sub.example.com/site3), Drupal will search for configuration files in the following order, using the first configuration it finds: sites/www.sub.example.com.site3/settings.php sites/sub.example.com.site3/settings.php
  • 23. Drupal lookup for settings.php When searching for a site configuration (for example www.sub.example.com/site3), Drupal will search for configuration files in the following order, using the first configuration it finds: sites/www.sub.example.com.site3/settings.php sites/sub.example.com.site3/settings.php sites/example.com.site3/settings.php
  • 24. Drupal lookup for settings.php When searching for a site configuration (for example www.sub.example.com/site3), Drupal will search for configuration files in the following order, using the first configuration it finds: sites/www.sub.example.com.site3/settings.php sites/sub.example.com.site3/settings.php sites/example.com.site3/settings.php sites/www.sub.example.com/settings.php
  • 25. Drupal lookup for settings.php When searching for a site configuration (for example www.sub.example.com/site3), Drupal will search for configuration files in the following order, using the first configuration it finds: sites/www.sub.example.com.site3/settings.php sites/sub.example.com.site3/settings.php sites/example.com.site3/settings.php sites/www.sub.example.com/settings.php sites/sub.example.com/settings.php
  • 26. Drupal lookup for settings.php When searching for a site configuration (for example www.sub.example.com/site3), Drupal will search for configuration files in the following order, using the first configuration it finds: sites/www.sub.example.com.site3/settings.php sites/sub.example.com.site3/settings.php sites/example.com.site3/settings.php sites/www.sub.example.com/settings.php sites/sub.example.com/settings.php sites/example.com/settings.php
  • 27. Drupal lookup for settings.php When searching for a site configuration (for example www.sub.example.com/site3), Drupal will search for configuration files in the following order, using the first configuration it finds: sites/www.sub.example.com.site3/settings.php sites/sub.example.com.site3/settings.php sites/example.com.site3/settings.php sites/www.sub.example.com/settings.php sites/sub.example.com/settings.php sites/example.com/settings.php sites/default/settings.php
  • 28. Single Sign On(SSO) SSO means when you created a user/pass on one site, it will work on the other site(s)
  • 29. Single Sign On(SSO) SSO means when you created a user/pass on one site, it will work on the other site(s) These sites will share session and user-related tables so once users login to one of the sites, they will auto login to the other site without logging in exclusively.
  • 30. Single Sign On(SSO) SSO means when you created a user/pass on one site, it will work on the other site(s) These sites will share session and user-related tables so once users login to one of the sites, they will auto login to the other site without logging in exclusively. In addition to that, we can share User roles and profiles among the two sites.
  • 31. Prepare database and user(for SSO) # DB name: drupal_db # DB username: duser # Password: duserp
  • 32. Modify settings.php Open settings.php in the folder sites/news.example.com/ $db_url = 'mysql://username:password@localhost/databasename'; change it to, $db_url = 'mysql://duser:duserp@localhost/drupal_db';
  • 33. Modify settings.php : $db_prefix We have a variable called “$db_prefix” which will do the magic Since we want to share a database among two sites but not completely, we decide which tables to share / not to share.
  • 34. Modify settings.php : $db_prefix $db_prefix = array( 'default' => 'news_', 'users' => 'shared_', 'sessions' => 'shared_', 'role' => 'shared_', 'authmap' => 'shared_', 'users_roles' => 'shared_', );
  • 35. Now edit the settings.php file for sites/sn.example.com Use the same database connection information. $db_url = 'mysql://duser:duserp@localhost/drupal_db'; Then, you add an array of prefixes, which will look like: $db_prefix = array( 'default' => 'sn_', 'users' => 'shared_', 'sessions' => 'shared_', 'role' => 'shared_', 'authmap' => 'shared_', 'users_roles' => 'shared_', );
  • 37. SSO for two websites with 2 database An option : Multisite Login Module # Using a multisite installation. # Using a separate database for each site (no table prefixing, though the code could be modified to allow for this). # Share the users table across all sites (If this is not you, what are you hoping that this module will do for you?) # You need to install the Multisite Api module.