Required to set custom context url for superset #29547
Replies: 4 comments 5 replies
-
Hey @tanmoyrsc! 👋 I'm here to help you with any bugs, questions, or contributions you have in mind. I'm a bot designed to assist you while you wait for a human maintainer. To set a custom context URL for Apache Superset, you need to modify the Here is how you can configure it:
# superset_config.py
# Set the base URL for Superset
SUPERSET_WEBSERVER_BASEURL = 'https://FQDN/base'
For example, if deploying on a Linux-based system where your export SUPERSET_CONFIG_PATH=/app/superset_config.py If you are using Docker, you can add your overrides as shown below: COPY --chown=superset superset_config.py /app/
ENV SUPERSET_CONFIG_PATH /app/superset_config.py This change will set the base URL to |
Beta Was this translation helpful? Give feedback.
-
Yes, Apache Superset supports setting a custom context URL or base path. You can achieve this by configuring the
These configurations should help you run Superset under a custom base path URL [1][2]. |
Beta Was this translation helpful? Give feedback.
-
Has anyone gotten this to work? If so, what was your solution? |
Beta Was this translation helpful? Give feedback.
-
你需要添加一个独立的代理Nginx,以Docker-Compose为例
services:
# 省略其他容器...
# 以下是新增的容器
superset-nginx:
image: nginx:alpine
environment:
- "SUPERSET_CONTEXT_PATH=${SUPERSET_CONTEXT_PATH:-awesome}"
command: /bin/sh -c "envsubst '$${SUPERSET_CONTEXT_PATH}' < /etc/nginx/conf.d/superset.conf.template > /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
volumes:
- "./superset.conf.template:/etc/nginx/conf.d/superset.conf.template"
ports:
- "80:80"
depends_on:
- superset
class ReverseProxied(object):
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
script_name = environ.get('HTTP_X_SCRIPT_NAME', '')
if script_name:
environ['SCRIPT_NAME'] = script_name
path_info = environ['PATH_INFO']
if path_info.startswith(script_name):
environ['PATH_INFO'] = path_info[len(script_name):]
scheme = environ.get('HTTP_X_SCHEME', '')
if scheme:
environ['wsgi.url_scheme'] = scheme
return self.app(environ, start_response)
ADDITIONAL_MIDDLEWARE = [ReverseProxied, ] 这些配置经过验证可以满足你需要 |
Beta Was this translation helpful? Give feedback.
-
I required to access using customized URL like https://FQDN/base/dashboard, but not able to do so, could you please let me know if this feature is available or not, if available then how to do it?
Br,
Tanmoy
Beta Was this translation helpful? Give feedback.
All reactions