Setup Microsites
Microsite is a mechanism for multiple organizations, universities or campuses to have their own isolated Open Edx running either on separate domains or subdomains of a domain. Even though in the back, they have the same architecture deployed. The purpose of microsites is to group the courses so that learners can easily find them.
Add a microsite:
Before starting you need to set A record (a type of DNS record) in your domain hosting which resolves the domain name into the IP address of your Open Edx instance. An example of domain hosting is AWS Route53. For each microsite, there will be A record created for LMS and Studio (eg: university.com and studio.university.com). Another way of doing this is to create A record for wildcard subdomain (eg: *.university.com) once which would work for both LMS and Studio. In this tutorial, we will follow the latter approach.
Create Site Entry:
Login to the admin panel (/admin) of Open Edx instance.
Go to the Sites > sites and create two records one for LMS and one for Studio. Enter Domain name and Display name which would be like this campus1.university.com for LMS and campus1.studio.university.com for Studio.
Configure Ngnix:
For LMS, go to the lms nginx configuration located at /etc/nginx/sites-enabled/lms on the server and append LMS subdomain on server_name if it exists otherwise define the field. Similarly, append the other LMS subdomains for each microsite you configured (eg: campus2.university.com).
sudo nano /etc/nginx/sites-enabled/lms # LMS configuration file for nginx, templated by ansible server_name campus1.university.com campus2.university.com ;
For Studio, go to the cms nginx configuration located at /etc/nginx/sites-enabled/cms on the server and append Studio subdomain on server_name if it exists otherwise define the field. Similarly, append the other Studio subdomains for each microsite you configured (eg: campus2.studio.university.com).
sudo nano /etc/nginx/sites-enabled/cms # CMS configuration file for nginx, templated by ansible server_name campus1.studio.university.com campus2.studio.university.com ;
Restart the Nginx server for the changes to take effect.
sudo service nginx restart
After above settings, open the LMS and Studio subdomains on the browser and you will see the home screens.
Constraints:
There are certain limitations to microsite architecture in Open Edx. One of them is learner login to a microsite, let's say campus1.university.com will access the other microsites as well (i.e campus2.university.com and so on).