Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Updated Cluster Proxy Setup docs #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions _posts/admin/2022-01-27-clusterproxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ In this example, we will be using the following host names:
## Proxy Cluster Server

In this example, we will use a simple nginx based setup. For each BigBlueButton
server, add a new location directive. For the first node, this would be:
server, add three new location directives. For the first node, this would be:

```
location /bbb-01/html5client/ {
Expand All @@ -73,9 +73,32 @@ location /bbb-01/html5client/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}

location /bbb-01/learning-analytics-dashboard/ {
proxy_pass https://bbb-01.example.com/learning-analytics-dashboard/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Accept-Encoding "";

sub_filter_types text/html text/css text/xml application/javascript;
sub_filter 'src="/learning' 'src="/bbb-01/learning';
sub_filter 'href="/learning' 'href"/bbb-01/learning';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-  sub_filter        'href="/learning' 'href"/bbb-01/learning';
+  sub_filter        'href="/learning' 'href="/bbb-01/learning';

sub_filter 'href="/favicon' 'href="/bbb-01/favicon';
sub_filter '/html5client' 'https://bbb-01.example.com/bbb-01/html5client';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to point to the cluster vhost, not the nodes host:

sub_filter '/bigbluebutton/api/learningDashboard' 'https://bbb-01.example.com/bigbluebutton/api/learningDashboard';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-sub_filter        '/bigbluebutton/api/learningDashboard' 'https://bbb-01.example.com/bigbluebutton/api/learningDashboard';
+sub_filter        '/bigbluebutton/' 'https://bbb-01.example.com/bigbluebutton/';

Otherwise the presentation previews provided under /bigbluebutton/presentation will be loaded from the cluster proxy, not the node.

sub_filter_once off;
}

location /bbb-01/favicon.ico {
proxy_pass https://bbb-01.example.com/favicon.ico;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
```

Repeat this `location` directive for every BigBlueButton server.
Repeat these three `location` directives for every BigBlueButton server.

You are free to choose any other HTTP reverse proxy software to fill the role
of the reverse proxy in this setup.
Expand Down Expand Up @@ -103,7 +126,7 @@ public:
app:
basename: '/bbb-01/html5client'
bbbWebBase: 'https://bbb-01.example.com/bigbluebutton'
learningDashboardBase: 'https://bbb-01.example.com/learning-dashboard'
learningDashboardBase: 'https://bbb-proxy.example.com/bbb-01/learning-dashboard'
media:
stunTurnServersFetchAddress: 'https://bbb-01.example.com/bigbluebutton/api/stuns'
sip_ws_host: 'bbb-01.example.com'
Expand Down Expand Up @@ -157,6 +180,14 @@ location =/html5client/locale {
}
```

Add the following piece into the `location /bbb-01/html5client/locales` directive in `/usr/share/bigbluebutton/nginx/bbb-html5.nginx`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just go into the package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Sorry for the late. Could you please elaborate? I don't have much experience with the packages.

Copy link
Contributor

@danimo danimo Dec 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a separate commit to bigbluebutton/build/packages-template/bbb-html5/bbb-html5.nginx with these changes. They will be part of the packages in the next nightly build.


```
if ($bbb_loadbalancer_node) {
add_header 'Access-Control-Allow-Origin' $bbb_loadbalancer_node always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
}
```

Restart BigBlueButton:

Expand Down