1 | initial version |
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.
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)
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;
}
}
Restart Nginx: Run the following command to restart Nginx and apply the changes:
sudo systemctl restart nginx
Access Superset: Navigate to https://localhost and you should be able to access Superset over HTTPS.