superset_app_root doesn't work in superset 4.1.2 with nginx #33229
Replies: 5 comments 1 reply
-
To resolve the 404 error when accessing Apache Superset 4.1.2 with a custom application root '/analytics' in a Kubernetes environment using Nginx as a proxy, ensure that the Here is how you can set the FLASK_APP="superset:create_app(superset_app_root='/analytics')" Or, if you are using Docker: SUPERSET_APP_ROOT='/analytics' Make sure your Nginx configuration is set to handle the '/analytics' path correctly, forwarding it to the Superset service. This might involve setting up a location block in your Nginx configuration like this: location /analytics/ {
proxy_pass http://your-superset-service/analytics/;
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;
} Ensure that the Nginx configuration and the Superset application root are consistent with each other [1]. Additionally, when using a reverse proxy with a custom application root, you should enable the ENABLE_PROXY_FIX = True Furthermore, ensure that the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
please don't reply by BOT , its suggestion doesn't work. |
Beta Was this translation helpful? Give feedback.
-
What doesn't work about the bot's response? It looks at least mostly correct to me. Here's the latest PR regarding SUPERSET_APP_ROOT that may help with more info. #30134 I'll move this to a Discussion, since it's a config/infra question rather than a Superset bug. |
Beta Was this translation helpful? Give feedback.
-
I am also having problems with this topic. I have tried multiple configurations, including APPLICATION_ROOT variable in superset_config.py, and environment variable SUPERSET_APP_ROOT. It is unclear what is the right way to do it properly. Moreover, in some of the configurations, I was able to access superset in my non-root directory, but statics were not properly located. I am using docker-compose. I mount superset_config.py from host in /app/pythonpath_docker in the containers. I am using nginx as proxy to load certificates and HTTPs, like this:
|
Beta Was this translation helpful? Give feedback.
-
I also could not get it to work. Tried everything just like you. I actually went in and changed the image tag to |
Beta Was this translation helpful? Give feedback.
-
Bug description
hi, i need to prefix superset app in k8s cluster.
so i installed superset 4.1.2-py311 in K8S with official helm chart superset/superset:0.14.2 and tried to visit it via proxy nginx , but it doesn't work. the steps are:
part of my custom setting in superset_config.py:
nginx log:
pod log:
i also tried other ways below also doesn't work:
https://github.com/emesday/prefixed-superset/blob/main/nginx/conf.d/superset.conf.template
https://www.restack.io/docs/superset-knowledge-superset-url-prefix-guide
https://github.com/KomootArchive/superset-reverse-nginx-example/blob/master/nginx/nginx.conf
any suggestion ?
Screenshots/recordings
No response
Superset version
4.1.2
Python version
3.11
Node version
Not applicable
Browser
Firefox
Additional context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions