Docs Self-Managed Manage Redpanda Console Configuration HTTP Path Rewrites You are viewing the Self-Managed v24.3 beta documentation. We welcome your feedback at the Redpanda Community Slack #beta-feedback channel. To view the latest available version of the docs, see v24.2. HTTP Path Rewrites If you want to host Redpanda Console under a subpath rather than the root path, you need to configure HTTP path rewrites. This allows you to serve Redpanda Console under a subpath of your domain, such as https://my-company.com/redpanda/console, instead of directly from https://my-company.com. This type of configuration is often necessary when: You have multiple services and applications running under the same domain. Redpanda Console is behind a reverse proxy. The proxy might add a path prefix based on routing rules, and Redpanda Console needs to know about this prefix to handle requests correctly. If you host Redpanda Console at a root path, for example under a sub-domain such as https://console.redpanda.my-company.com, you don’t need to configure HTTP path rewrites. Configuration To configure HTTP path rewrites, set the following properties within the server object in your Redpanda Console configuration file: Configuration Description Default basePath The subpath under which Redpanda Console is hosted. If you have a proxy in front of Redpanda Console that sets the X-Forwarded-Prefix header and setBasePathFromXForwardedPrefix is enabled, you do not need to set basePath manually. See Custom subpath scenario. '' setBasePathFromXForwardedPrefix Tells Redpanda Console to use the X-Forwarded-Prefix header on incoming requests for determining the path prefix. If this header is present, its value will be used as the path prefix, and the value set in basePath will be ignored. See Custom subpath scenario. true stripPrefix Removes the specified prefix from the request path before routing it to Redpanda Console. If your proxy is configured to remove the prefix, you should disable stripPrefix in Redpanda Console. See Prefix removal scenario. true Custom subpath scenario Consider the following setup where you want to host Redpanda Console at https://my-company.com/redpanda/console/ and are using a reverse proxy to manage the routing: Nginx is configured to route requests from /redpanda/console to Redpanda Console, running on http://localhost:8080. Redpanda Console configuration server: setBasePathFromXForwardedPrefix: true stripPrefix: true Nginx configuration location /redpanda/console/ { proxy_pass http://localhost:8080/; proxy_set_header X-Forwarded-Prefix /redpanda/console; } A user navigates to https://my-company.com/redpanda/console/topics in their browser. Nginx receives the request and recognizes the /redpanda/console subpath. It forwards the request to Redpanda Console at http://localhost:8080/topics, while adding the X-Forwarded-Prefix: /redpanda/console header. Because setBasePathFromXForwardedPrefix is set to true, Redpanda Console checks the X-Forwarded-Prefix header. It identifies that the base path is /redpanda/console and removes this prefix from the incoming request path. The request path /topics is now correctly routed in Redpanda Console. If Nginx were configured without the X-Forwarded-Prefix header, or if setBasePathFromXForwardedPrefix was set to false, Redpanda Console would not correctly recognize the subpath, leading to routing issues. This configuration is particularly useful when multiple environments or proxies might route to the same Redpanda Console instance under different subpaths. Prefix removal scenario Some proxies, such as Traefik, can remove a prefix from the URL path before forwarding it. If both the proxy and Redpanda Console attempt to remove the prefix, Redpanda Console may fail to route the request correctly. Only one part of the stack (either the proxy or Redpanda Console) should remove the prefix. To better understand this problem, consider the following scenario: Traefik is configured to route /topics to Redpanda Console with the "StripPrefix" middleware enabled. Redpanda Console is configured with the default settings, which includes stripPrefix: true. A user enters the following address in their browser: example.com/topics/topics/example-topic. Traefik removes the first /topics from the path, leaving /topics/example-topic, and sets /topics in the X-Forwarded-Prefix header. Redpanda Console sees the X-Forwarded-Prefix and attempts to remove what it thinks is the prefix. The path becomes /example-topic. Redpanda Console then tries to find a handler for /example-topic, but no such route exists, leading to a failure. To avoid this issue, either disable stripPrefix in Console or ensure that the proxy does not modify the request path in a conflicting manner. Proxy rewrites If you have a reverse proxy between Redpanda Console and Kafka Connect, ensure that any rewrite rules retain the necessary expand parameters in the query string. These parameters are crucial for Kafka Connect to return the correct details about the connectors: ://<kafka_connect_host>:8083/connectors?expand=info&expand=status This ensures that Redpanda Console can correctly communicate with Kafka Connect even when hosted behind a proxy that rewrites URLs. Back to top × Simple online edits For simple changes, such as fixing a typo, you can edit the content directly on GitHub. Edit on GitHub Or, open an issue to let us know about something that you want us to change. Open an issue Contribution guide For extensive content updates, or if you prefer to work locally, read our contribution guide . Was this helpful? thumb_up thumb_down group Ask in the community mail Share your feedback group_add Make a contribution TLS Termination Deserialization