Multiple Domains with NGINX proxy_pass

270 views
Skip to first unread message

Patryk Fischer

unread,
Jun 3, 2022, 5:55:56 AM6/3/22
to BigBlueButton-Setup
Hey, I am currently experimenting with multiple Domains for one Server.
The following NGINX block seems to work just fine so I would be happy to share it with you and get improvements and or problems if you find any.

server {
    server_name bbb2.new-domain.com;

    access_log /var/log/nginx/reverse-access.log;
    error_log /var/log/nginx/reverse-error.log;

    proxy_redirect   off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";

    location / {
        proxy_pass https://bbb2.new-domain.com;
        sub_filter "bbb0.original-domain.com" "bbb2.new-domain.com";
        sub_filter_once off;
    }

    listen 443 ssl http2;
    [...] # ssl settings
}

Error logs in NGINX, Browser and bbb-conf --watch are empty.
Reply all
Reply to author
Forward
0 new messages