# Wrong Base URL Keycloak Deploy on AWS EKS

**URL:** <https://forum.keycloak.org/t/wrong-base-url-keycloak-deploy-on-aws-eks/2896>\
**Category:** Configuring the server\
**Created:** [May 22, 2020, 9:58am UTC](https://forum.keycloak.org/t/wrong-base-url-keycloak-deploy-on-aws-eks/2896 "2020-05-22T09:58:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edmaputra](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/edmaputra/32/688_2.png) [@edmaputra](https://forum.keycloak.org/u/edmaputra)\
**Post date:** [May 22, 2020, 9:58am UTC](https://forum.keycloak.org/t/wrong-base-url-keycloak-deploy-on-aws-eks/2896/1 "2020-05-22T09:58:05Z")

</div>

Hi everyone, i have a problem when deploy the Keycloak Server on AWS EKS  
here is my configuration:

`Deployment.yaml`

> ```
> apiVersion: apps/v1
> kind: Deployment
> metadata:
> name: my-keycloak
> spec:
> replicas: 1
> selector:
> matchLabels:
> app: my-keycloak
> template:
> metadata:
> labels:
> app: my-keycloak
> spec:
> containers:
> - name: my-keycloak
> image: jboss/keycloak
> imagePullPolicy: IfNotPresent
> ports:
> - containerPort: 8080
> name: http
> - containerPort: 8443
> name: https
> env:
> - name: PROXY_ADDRESS_FORWARDING
> value: "true"
> 
> ```

`Service.yaml`

> ```
> apiVersion: v1
> kind: Service
> metadata:
> name: my-keycloak
> spec:
> selector:
> app: my-keycloak
> ports:
> - port: 8080
> targetPort: 8080
> name: http
> 
> ```

`Ingress.yaml`

> ```
> apiVersion: extensions/v1beta1
> kind: Ingress
> metadata:
> labels:
> app: my-keycloak
> name: my-keycloak-ingress
> spec:
> rules:
> - host: mykecloak.com
> http:
> paths:
> - backend:
> serviceName: my-keycloak
> servicePort: 8080
> 
> ```

but the base url always set to this, which is false and not work. What i want that the base url should be **[https://mykeycloak.com/](https://mykeycloak.com/)**\* (with https and without the port number)

 ![2020-05-22_16-47-45](https://global.discourse-cdn.com/free1/uploads/keycloak/original/1X/cda734c58640f513b96e339a9a59d42b67704092.jpeg)

Many people said that the solution is set the **PROXY\_ADDRESS\_FORWARDING** to **TRUE** , but it doesnot work for me. Is there something i miss ?  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [May 22, 2020, 10:24am UTC](https://forum.keycloak.org/t/wrong-base-url-keycloak-deploy-on-aws-eks/2896/2 "2020-05-22T10:24:55Z")

</div>

It looks like your ingress didn’t set `X-Forwarded-Proto/X-Forwarded-For` headers. Configure them, doc: [https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/)

---

<div class="post-metadata">

**Author:** ![edmaputra](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/edmaputra/32/688_2.png) [@edmaputra](https://forum.keycloak.org/u/edmaputra)\
**Post date:** [June 4, 2020, 4:06am UTC](https://forum.keycloak.org/t/wrong-base-url-keycloak-deploy-on-aws-eks/2896/3 "2020-06-04T04:06:04Z")

</div>

hi @jangaraj

i already set the configmap like this

```auto
apiVersion: v1
kind: ConfigMap
metadata:
  annotations:
  labels:
    app: ingress-nginx
  name: nginx-configuration
  namespace: ingress-nginx
data:
  use-forwarded-headers: "true"

```

but the issue still occur.

those are current configmap on ingress-nginx namespace

```auto
enable-access-log-for-default-backend: true
hsts: true
hsts-include-subdomains: true
proxy-body-size: 100M
worker-shutdown-timeout: 25s
hsts-preload: true
server-tokens: false
hsts-max-age: 31536000

Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: frame-ancestors 'self' 'https://login.microsoftonline.com' 'https://xxxx';

```

is there any additional configurations ?
