Articles in this section
Category / Section

How to resolve the HTTPS redirection issue in Bold BI when using it with an external load balancer

Published:

This section will explain the steps necessary to resolve the HTTPS redirection issue in Bold BI when using it with an external load balancer.

  1. Navigate to the location of the Nginx configuration file.
    Ubuntu- /etc/nginx/sites-available
    CentOS/RedHat - /etc/nginx/conf.d

  2. Open the boldbi-nginx-config file in any editor mode.

  3. Replace the proxy_set_header attribute value with $http_x_forwarded_proto instead of $scheme in boldbi-nginx-config file for all 10 services (location /, location /api, location /ums, location /bi, location /bi/api, location /bi/jobs, location /bi/designer, location /bi/designer/helpher, location /etlservice , location /etlservice/_framework/blazor.server.js) and save it.
    Example:
    From:
    image.png

    To:

    image.png

    Reference Nginx configuration file with required changes:

    #server {
    #listen 80;
    #server_name example.com;
    #return 301 https://example.com$request_uri;
    #}
    
    server {
            listen       80 default_server;
            listen       [::]:80 default_server;
            
            #server_name   example.com;
            
            #listen 443 ssl;
            #ssl_certificate /path/to/certificate/file/domain.crt;
            #ssl_certificate_key /path/to/key/file/domain.key;
            
            proxy_buffer_size   128k;
            proxy_buffers   4 256k;
            proxy_busy_buffers_size   256k;
            large_client_header_buffers 4 16k;		
            proxy_read_timeout 300;
            proxy_connect_timeout 300;
            proxy_send_timeout 300;
            send_timeout 300;
            client_max_body_size 200M;
    
        location / { 
            root               /var/www/bold-services/application/idp/web/wwwroot;
            proxy_pass         http://localhost:6500/;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
            fastcgi_buffers    16 16k;
            fastcgi_buffer_size 32k;
        }
        location /api {
            proxy_pass         http://localhost:6501/api;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
        location /ums {
            root               /var/www/bold-services/application/idp/ums/wwwroot;
            proxy_pass         http://localhost:6502/ums;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
        # Start of bi locations
        location /bi { 
            root               /var/www/bold-services/application/bi/web/wwwroot;
            proxy_pass         http://localhost:6504/bi;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
        location /bi/api {
            proxy_pass         http://localhost:6505/bi/api;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
        location /bi/jobs {
            proxy_pass         http://localhost:6506/bi/jobs;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
        location /bi/designer {
            root               /var/www/bold-services/application/bi/designer/wwwroot;
            proxy_pass         http://localhost:6507;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
        location /bi/designer/helper {
            proxy_pass http://localhost:6507/bi/designer/helper;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
            location /etlservice/ {
            root               /var/www/bold-services/application/etl/etlservice/wwwroot;
            proxy_pass         http://localhost:6509/;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection "upgrade";
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
        }
            location /etlservice/_framework/blazor.server.js {
            root               /var/www/bold-services/application/etl/etlservice/wwwroot;
            proxy_pass         http://localhost:6509/_framework/blazor.server.js;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection "upgrade";
            proxy_set_header   Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;
    }
        # End of bi locations
    }    
    
  4. Once the above changes have been made, restart Nginx using the command below.

    sudo systemctl restart nginx
    

`

Additional Reference:

Learn more about the forwarded header that is used for Nginx files.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SS
Written by Sivanesan Saravanan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied