dosubot[bot] commented on issue #33226:
URL: https://github.com/apache/superset/issues/33226#issuecomment-2827030974
<!-- Answer -->
To resolve the 404 error and redirection issue when deploying Superset under
a sub_path, ensure the following configurations are correctly set:
1. **Superset Configuration**:
- Ensure `SUPERSET_APP_ROOT` is set in your environment variables or in
the `superset_config.py` file. This is crucial for handling the sub_path
correctly.
- Uncomment and set `SUPERSET_APP_ROOT` in your `superset_config.py`:
```python
SUPERSET_APP_ROOT = '/analytics'
```
2. **Nginx Configuration**:
- Ensure the `proxy_pass` directive includes the sub_path:
```nginx
location /analytics/ {
proxy_pass http://x.x.x.x:8088/analytics/;
proxy_set_header X-Forwarded-Prefix /analytics/;
}
```
3. **Kubernetes Deployment**:
- Set the `SUPERSET_APP_ROOT` environment variable in your Kubernetes
deployment configuration:
```yaml
env:
- name: SUPERSET_APP_ROOT
value: "/analytics"
```
4. **Check for Hardcoded Paths**:
- Superset may have hardcoded paths that do not respect the sub_path
configuration. This is a known limitation when deploying under a sub_path in
Kubernetes
<sup>[[1]](https://github.com/apache/superset/discussions/31570)</sup>.
These steps should help in resolving the redirection issue and ensure that
Superset operates correctly under the `/analytics` sub_path.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great
Response](https://app.dosu.dev/response-feedback/5ae4a557-56af-47ae-9660-19d6e546160e?feedback_type=great_response)
| [Irrelevant
Answer](https://app.dosu.dev/response-feedback/5ae4a557-56af-47ae-9660-19d6e546160e?feedback_type=irrelevant_answer)
| [Incorrect
Sources](https://app.dosu.dev/response-feedback/5ae4a557-56af-47ae-9660-19d6e546160e?feedback_type=incorrect_sources)
| [Too
Verbose](https://app.dosu.dev/response-feedback/5ae4a557-56af-47ae-9660-19d6e546160e?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/5ae4a557-56af-47ae-9660-19d6e546160e?feedback_type=hallucination)
| [Bug
Report](https://app.dosu.dev/response-feedback/5ae4a557-56af-47ae-9660-19d6e546160e?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/5ae4a557-56af-47ae-9660-19d6e546160e?feedback_type=other)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]