GitHub user dosubot[bot] added a comment to the discussion: How to proxy with Nginx
<!-- Greeting --> Hi @HenryBao91! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the superset team. <!-- Answer --> You have a typo in your superset_config.py: `SUPERSET_APP_ROOT` is set to `"/supertset"` instead of `"/superset"`. This will break routing and cause 404 errors. Make sure both your superset_config.py and your environment variables set `SUPERSET_APP_ROOT = "/superset"` (no typo, no trailing slash). For Superset 5.0.0, subpath support is still BETA and has known bugs, but you can get it mostly working with the following setup: **1. superset_config.py** ```python ENABLE_PROXY_FIX = True SUPERSET_APP_ROOT = "/superset" # You do NOT need to set STATIC_ASSETS_PREFIX manually; Superset will set it for you. ``` **2. Environment variables** Make sure there is no mismatch between your environment and superset_config.py. The environment variable will override the config file if both are set. **3. Nginx config** Update your location block to include the required headers: ```nginx location /superset/ { proxy_pass http://10.100.2.119:8088/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; 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-Prefix /superset; port_in_redirect off; } ``` You should also add a location for static assets: ```nginx location /superset/static/ { proxy_pass http://10.100.2.119:8088/static/; proxy_http_version 1.1; proxy_set_header Host $host; } ``` **4. Restart everything** After fixing the typo and updating configs, restart both Superset and Nginx. **Known limitations:** Superset 5.0.0 has incomplete subpath support. Some URLs (like user info, some static assets, or certain redirects) may still break or miss the prefix, causing 404s. These are known bugs and are only fully fixed in Superset 6.0 and later [[source](https://github.com/apache/superset/issues/35027)]. **Troubleshooting:** - Double-check for typos and that all configs use `/superset` (not `/supertset`). - Make sure your browser cache is cleared after config changes. - If you still get 404s, check the Superset logs for missing prefix errors or static asset issues. More details and examples: - [Nginx config and subpath deployment discussion](https://github.com/apache/superset/issues/34773) - [Known bugs and limitations in 5.0.0](https://github.com/apache/superset/issues/35027) If you need full, stable subpath support, consider upgrading to Superset 6.0 or later. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/6ab91ecb-c955-48d4-a03a-5a541c38f434?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6ab91ecb-c955-48d4-a03a-5a541c38f434?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6ab91ecb-c955-48d4-a03a-5a541c38f434?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6ab91ecb-c955-48d4-a03a-5a541c38f434?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6ab91ecb-c955-48d4-a03a-5a541c38f434?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/6ab91ecb-c955-48d4-a03a-5a541c38f434?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6ab91ecb-c955-48d4-a03a-5a541c38f434?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36079) GitHub link: https://github.com/apache/superset/discussions/36079#discussioncomment-14942610 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
