Ask Your Question
0

What are the steps to activate HTTPS in Superset while running it on a local server?

asked 2023-06-03 02:43:34 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-03 03:08:01 +0000

scrum gravatar image
  1. Generate SSL certificate: You can obtain a SSL certificate from a trusted certificate authority (CA) or generate a self-signed certificate using OpenSSL or any other tool.

  2. Update Superset configuration: Navigate to superset/config and edit the superset_config.py file. Set the following parameters:

    a. ENABLEPROXYFIX = True

    b. PREFERREDURLSCHEME = 'https'

    c. WEBDRIVER_BASEURL = 'https://localhost:8989/' (Replace localhost with your server domain name)

  3. Update Nginx configuration: If you are using Nginx as a reverse proxy for your local server, you need to update Nginx configuration. Navigate to /etc/nginx/sites-available/ and edit the default file. Add the following lines:

    server {

    listen 80;

    server_name localhost; (Replace localhost with your server domain name)

    return 301 https://$host$request_uri;

    }

    server {

    listen 443 ssl;

    server_name localhost; (Replace localhost with your server domain name)

    sslcertificate /path/to/certfile;

    sslcertificatekey /path/to/key_file;

    location / {

    proxy_pass http://localhost:8989;
    
    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 X-Forwarded-Proto $scheme;
    
    proxy_set_header X-Forwarded-Host $host;
    
    proxy_redirect off;
    

    }

    }

  4. Restart Nginx: Run the following command to restart Nginx and apply the changes:

    sudo systemctl restart nginx

  5. Access Superset: Navigate to https://localhost and you should be able to access Superset over HTTPS.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-03 02:43:34 +0000

Seen: 10 times

Last updated: Jun 03 '23