# Admin console is not accessible without appended relative path value

**URL:** <https://forum.keycloak.org/t/admin-console-is-not-accessible-without-appended-relative-path-value/27543>\
**Category:** Configuring the server\
**Tags:** admin-console\
**Created:** [August 22, 2024, 8:56am UTC](https://forum.keycloak.org/t/admin-console-is-not-accessible-without-appended-relative-path-value/27543 "2024-08-22T08:56:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Overexert4](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/overexert4/32/11118_2.png) [@Overexert4](https://forum.keycloak.org/u/Overexert4)\
**Post date:** [August 22, 2024, 8:56am UTC](https://forum.keycloak.org/t/admin-console-is-not-accessible-without-appended-relative-path-value/27543/1 "2024-08-22T08:56:49Z")

</div>

Recently we migrated from v15 to v25. We needed to keep legacy `/auth` in the path, hence relative path parameter was used. Now every time we access the KC admin console we need to append `/auth` to the host (i.e. [https://my.keycloak.com/auth](https://my.keycloak.com/auth) instead of just [https://my.keycloak.com](https://my.keycloak.com)). Whenever we make a request without `/auth`, the response is `Resource not found`. What is wrong with my configuration?

```auto
keycloak_relative_path = "/auth"
service_environment = [
    {
        "name": "KC_DB_URL_HOST",
        "value": var.database.address
    },
    {
        "name" : "KC_DB_URL_DATABASE",
        "value" : var.database.db_name
    },
    {
        "name" : "KC_DB_SCHEMA",
        "value" : "public"
    },
    {
        "name" : "KC_DB",
        "value" : "postgres"
    },
    {
        "name" : "KEYCLOAK_USER",
        "value" : "admin"
    },
    {
        "name": "KC_HTTP_RELATIVE_PATH",
        "value": local.keycloak_relative_path
    },
    {
        "name": "KC_LOG_LEVEL",
        "value": "INFO"
    },
    {
        "name": "KC_LOG_CONSOLE_OUTPUT",
        "value": "json"
    },
    {
        "name": "KC_LOG",
        "value": "console"
    },
    {
        "name" : "KC_HOSTNAME",
        "value" : format("%s%s", var.keycloak_hostname, local.keycloak_relative_path)
    },
    {
        "name" : "KC_PROXY_HEADERS",
        "value" : "forwarded"
    },
    {
        "name" : "KC_HTTP_ENABLED",
        "value" : "true"
    },
    {
        "name" : "KC_HEALTH_ENABLED",
        "value" : "true"
    }
]

```

---

<div class="post-metadata">

**Author:** ![gmolaire](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/gmolaire/32/10287_2.png) [@gmolaire](https://forum.keycloak.org/u/gmolaire)\
**Post date:** [August 22, 2024, 3:08pm UTC](https://forum.keycloak.org/t/admin-console-is-not-accessible-without-appended-relative-path-value/27543/2 "2024-08-22T15:08:57Z")

</div>

You need to set the admin hostname as well if you don’t want it to share the same endpoint as hostname: `KC_HOSTNAME_ADMIN`

More details here: [Configuring the hostname (v2) - Keycloak](https://www.keycloak.org/server/hostname)

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [August 22, 2024, 5:30pm UTC](https://forum.keycloak.org/t/admin-console-is-not-accessible-without-appended-relative-path-value/27543/3 "2024-08-22T17:30:54Z")

</div>

If you set the `KC_HTTP_RELATIVE_PATH`, you always will have to add this path to your URL if you just enter the root path. Keycloak won’t redirect to the relative path. Thus, showing the 404/Resource not found.
