How to change the default root url in sentry?

i deployed Sentry 9.1.2 in my kubernetes cluster, and everything works fine when i run it over nginx ingress on the root url (’/’) and its always redirected to /auth/login/sentry path, so i thought if i can change this default url to something like /sentry/auth/login.

I added some configurations to sentry.conf.py :

FORCE_SCRIPT_NAME = ‘/sentry’
STATIC_URL = ‘/sentry/_static/’
SENTRY_URL_PREFIX = ‘http://my-hostname.com/sentry
LOGIN_URL = ‘/sentry/login’
LOGIN_REDIRECT_URL = ‘/sentry/’

Now i can see that my url is redirected to /sentry/auth/login but i encountered some javascript loading problems, i heard that SCRIPT_NAME must be added along with FORCE_SCRIPT_NAME and SENTRY_URL_PREFIX but i really don’t know in which file to put it (as i think its not sentry.conf.py).

We don’t support running Sentry at a sub path. As you found out. There’s no combination of configuration you could do to make it work.

You mean there is no way to change /auth/login/sentry to something else

Correct. It needs its own unique domain or IP address not shared with anything else.

I tried exposing it on ELB internal load balancer so it gets its own domain but when i try to access it through the ELB url it still refreching indifinetly without any result
Here is what i’ve done before :

apiVersion: v1
kind: Service
metadata:
annotations:
meta.helm.sh/release-name: sentry
meta.helm.sh/release-namespace: default
service.beta.kubernetes.io/aws-load-balancer-internal: “true”
labels:
app: sentry
app.kubernetes.io/managed-by: Helm
chart: sentry-4.1.0
heritage: Helm
release: sentry
name: sentry
namespace: tools
spec:
ports:

  • name: sentry
    port: 9000
    protocol: TCP
    targetPort: 9000
    selector:
    app: sentry
    role: web
    type: LoadBalancer

You need to set the system.url-prefix value mentioned on the docs to the publicly available URL of you Sentry instance.