Configure nginx to display a static HTML page next to BBB

388 views
Skip to first unread message

Chris M

unread,
Jun 29, 2021, 8:58:23 AM6/29/21
to BigBlueButton-dev

Hello,
I would like to configure nginx to serve a static HTML page at a specific URL. The index.html file can be accessed under the follwing path:
/var/www/mypage/dist/index.html

Here is what I have done so far:

In /etc/nginx/sites-available, I created a new file called 'mypage' with the following content:

server {
  listen 80;
  listen [::]:80;
  server_name myBBB-DNS-name.com;

  root /var/www/mypage/dist;

  location /mypage {
    default_type "text/html";
    try_files $uri $uri.html $uri/index.html index.html $uri/ =404;
  }

In the /etc/nginx/sites-enabled folder, I created a symlink with this command:
sudo ln -s /etc/nginx/sites-available/mypage /etc/nginx/sites-enabled/

Then I restarted nginx with:
sudo systemctl restart nginx

When i call myBBB-DNS-name.com/mypage/index.html from my brower, I always get a "404 Not Found - nginx" error.

I hope that you can help me.

With kind regards

sd...@distancelearning.cloud

unread,
Jun 29, 2021, 9:56:48 AM6/29/21
to bigblueb...@googlegroups.com

Look in /var/log/nginx and inspect the logs to see if anythiing shows.

/var/www/bigbluebutton-default/ has permissions root:root on my server.

 

What are the permissions on directory?

 

If you don’t want to mess with this…  and use the same domain,   just add mypage under/var/www/bigbluebutton-defualt/mypage and then

App will work on bbb domain /mypage

 

Regards,

Stephen

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bigbluebutton-dev/9f8edf08-8753-4a4e-a7e8-e938da0f21d6n%40googlegroups.com.

Chris M

unread,
Jun 29, 2021, 10:56:00 AM6/29/21
to BigBlueButton-dev
Hello Stephen,

the permissions of all folders in "/var/www" belong to root:root with "drwxr-xr-x"

The error log file /var/log/nginx/error.log shows this, if I try to access the webpage from my browser:

2021/06/29 14:16:26 [error] 15035#15035: *85 connect() failed (111: Connection refused) while connecting to upstream, client: 1.2.3.4, server:  myBBB-DNS-name.com, request: "GET /mypage/index.html HTTP/1.1", upstream: "http://127.0.0.1:9090/mypage/index.html", host: " myBBB-DNS-name.com "
2021/06/29 14:16:26 [error] 15035#15035: *85 open() "/var/www/nginx-default/50x.html" failed (2: No such file or directory), client: 217.110.213.131, server: myBBB-DNS-name.com, request: "GET /mypage/index.html HTTP/1.1", upstream: "http://127.0.0.1:9090/mypage/index.html", host: " myBBB-DNS-name.com"

Strangely, I now also get the following error when I run sudo bbb-conf --check:
# Error: Unable to reach default URL for presentation:
#

sd...@distancelearning.cloud

unread,
Jun 29, 2021, 1:59:50 PM6/29/21
to bigblueb...@googlegroups.com

Unclear to me why this is proxied to port 9090?   

Some rule is matching.  In 2.3 there are some custom rules to loadbalance multiple html5 clients.. is this 2.2 or 2.3?

sd...@distancelearning.cloud

unread,
Jun 29, 2021, 2:33:17 PM6/29/21
to bigblueb...@googlegroups.com

Just checked all the nginx conf files, don’t see 9090 anywhere in standard install.

Can you look again at you conf files and try to see what is set to 9090

 

Regards,

Stephen

Chris M

unread,
Jun 30, 2021, 6:33:55 AM6/30/21
to BigBlueButton-dev
Hello Stephen,
I am still using BBB version 2.2.
I had a proxy_pass rule in "/etc/nginx/sites-available/bigbluebutton" for testing reasons and accidentally did not take it out. I have now deleted it. It seems like nginx doesn't like that there are two "sites-enabled" listening on the same port.
The errorlog now shows me the following messages:

2021/06/30 10:13:51 [warn] 864#864: conflicting server name "myBBB-DNS-name.com" on 0.0.0.0:80, ignored
2021/06/30 10:13:51 [warn] 864#864: conflicting server name "myBBB-DNS-name.com" on [::]:80, ignored
2021/06/30 10:14:11 [error] 868#868: *2 open() "/var/www/bigbluebutton-default/mypage" failed (2: No such file or directory), client: 111.222.333.444, server: myBBB-DNS-name.com, request: "GET /mypage HTTP/1.1", host: "myBBB-DNS-name.com"
2021/06/30 10:14:12 [error] 868#868: *2 open() "/var/www/bigbluebutton-default/mypage" failed (2: No such file or directory), client: 111.222.333.444  , server: myBBB-DNS-name.com, request: "GET /mypageHTTP/1.1", host: "myBBB-DNS-name.com"
2021/06/30 10:14:17 [error] 868#868: *2 open() "/var/www/bigbluebutton-default/mypage/index.html" failed (2: No such file or directory), client: 111.222.333.444  , server: myBBB-DNS-name.com, request: "GET /mypage/index.html HTTP/1.1", host: "myBBB-DNS-name.com"

I still don't quite understand why nginx looks for the index.html at the following address "/var/www/bigbluebutton-default/mypage/index.html" and not at /var/www/mypage/index.html". Does this have anything to do with the order of the configuration files that nginx reads under "sites-enabled"?

Regards
Chris
Reply all
Reply to author
Forward
0 new messages