# Setting up a proxy in front of a Consul UI

**URL:** <https://discuss.hashicorp.com/t/setting-up-a-proxy-in-front-of-a-consul-ui/35742>\
**Category:** Consul\
**Created:** [February 15, 2022, 8:15pm UTC](https://discuss.hashicorp.com/t/setting-up-a-proxy-in-front-of-a-consul-ui/35742 "2022-02-15T20:15:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tass6773](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tass6773/32/24815_2.png) [@tass6773](https://discuss.hashicorp.com/u/tass6773)\
**Post date:** [February 15, 2022, 8:15pm UTC](https://discuss.hashicorp.com/t/setting-up-a-proxy-in-front-of-a-consul-ui/35742/1 "2022-02-15T20:15:05Z")

</div>

When setting up consul I bind the http port to local host. So when we want to expose the consul UI we put Nginx on the server and use Nginx to expose the UI. In Consul v1.10 we started seeing issues requiring us to hit the browser refresh at times when switching between services. In Consul v1.11 when you start typing in the search after 1 letter things just hang for minutes before responding. Are there any Nginx requirements for the Consul UI to fix this? When I expose the UI to an external IP it works fine.

---

<div class="post-metadata">

**Author:** ![tass6773](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tass6773/32/24815_2.png) [@tass6773](https://discuss.hashicorp.com/u/tass6773)\
**Post date:** [March 1, 2022, 12:03pm UTC](https://discuss.hashicorp.com/t/setting-up-a-proxy-in-front-of-a-consul-ui/35742/2 "2022-03-01T12:03:45Z")

</div>

This appears to be a timeout issue. I am not sure where to look. Any ideas?

This is what I see in the consul debug log.  
2022-02-28T21:05:21.129-0500 [DEBUG] agent.http: Request finished: method=GET url=/v1/internal/ui/services?dc=dc1&index=27575980 from=127.0.0.1:33184 latency=5m2.739515073s

This is what I am seeing in the Nginx Access logs  
127.0.0.1 - - consul consul-ui [28/Feb/2022:21:05:21 -0500] “GET /v1/internal/ui/services?dc=dc1&index=27575980 HTTP/1.1” 200 0 “[https://consul.io/ui/dc1/services?filter=not](https://consul.io/ui/dc1/services?filter=not)” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36” “-” 3898 0 302.741 302.741 127.0.0.1:8505

---

<div class="post-metadata">

**Author:** ![karl-cardenas-coding](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/karl-cardenas-coding/32/19422_2.png) [@karl-cardenas-coding](https://discuss.hashicorp.com/u/karl-cardenas-coding)\
**Post date:** [March 3, 2022, 4:55pm UTC](https://discuss.hashicorp.com/t/setting-up-a-proxy-in-front-of-a-consul-ui/35742/3 "2022-03-03T16:55:59Z")

</div>

Hi @tass6773 at the surface level, this sound more like a nginx configuration issue. Can you share with us the nginx configruation that you are using for `consul.io` please?

cc @johncowen

---

<div class="post-metadata">

**Author:** ![tass6773](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tass6773/32/24815_2.png) [@tass6773](https://discuss.hashicorp.com/u/tass6773)\
**Post date:** [March 15, 2022, 2:00pm UTC](https://discuss.hashicorp.com/t/setting-up-a-proxy-in-front-of-a-consul-ui/35742/4 "2022-03-15T14:00:02Z")

</div>

I think I figured out where the issue is. It looks like the following line in the Nginx config is causing the issue.

add\_header Cache-Control “max-age=0, no-cache, no-store, must-revalidate” always;

It seems like once I removed this section every became responsive.
