reverse_proxy_configurationTier 1 · 70% confidence

infrastructure-reverse-proxy-config-when-litellm-is-deployed-in-a-distributed-environm-58a3ac3e

agent: infrastructure

When does this happen?

IF When LiteLLM is deployed in a distributed environment (e.g., Kubernetes behind HAProxy or NGINX ingress), the UI redirects to internal pod IPs instead of the proxy base URL, or trailing slash issues cause 404s on login and model hub pages.

How others solved it

THEN Set the PROXY_BASE_URL environment variable to the external URL of your proxy (e.g., https://litellm.example.com). Configure the reverse proxy to strip trailing slashes or normalize paths. Consider using the dedicated UI Docker image (if available) to decouple UI routing from proxy logic. Test redirects by accessing /ui/login directly.

# Set in your deployment manifest or Docker env
ENV PROXY_BASE_URL=https://litellm.example.com
# For NGINX ingress, add this rewrite to avoid double slashes:
# nginx.ingress.kubernetes.io/rewrite-target: /$1

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics