# \[Resolved\] HAP/Docker/NAS redirecting not proxying

**URL:** <https://discourse.haproxy.org/t/resolved-hap-docker-nas-redirecting-not-proxying/1172>\
**Category:** Help!\
**Created:** [April 16, 2017, 10:30am UTC](https://discourse.haproxy.org/t/resolved-hap-docker-nas-redirecting-not-proxying/1172 "2017-04-16T10:30:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arano](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Arano](https://discourse.haproxy.org/u/Arano)\
**Post date:** [April 16, 2017, 10:30am UTC](https://discourse.haproxy.org/t/resolved-hap-docker-nas-redirecting-not-proxying/1172/1 "2017-04-16T10:30:32Z")

</div>

Hi,

I’ve set up a Haproxy docker container with the latest version 1.7 on my NAS Synology.  
The docker configuration seems ok, unless there is some unexpected behavior.

It’s my first time trying to make a Haproxy, I may miss some things.  
With my minimalist configuration :

```
defaults
		mode http
frontend front 
		bind *:5036
		option forwardfor
		use_backend box

backend box
		server box ip_server

```

When i navigate through “http:/ /ip\_Haproxy:5036” i’m redirected to "http:/ /ip\_server/"  
My trouble is i don’t want my client to be redirected, i want to see the “http:/ /ip\_server/” web page through the frontend of Haproxy, with the “http:/ /ip\_Haproxy:5036” url in the client browser

According to everything i read, it seemed to me that’s proxying is the basic functionnality of Haproxy, but I don’t even success to do so. Is there something i’m missing ? Is that the configuration or Haproxy simply doesn’t do this ?  
Or everything should be ok and it’s more on the end of Docker / DSM i need to look ?

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [April 16, 2017, 8:39pm UTC](https://discourse.haproxy.org/t/resolved-hap-docker-nas-redirecting-not-proxying/1172/2 "2017-04-16T20:39:24Z")

</div>

Your backend is redirecting. Maybe you can disable that in your DSM settings?

Otherwise you will probably have to rewrite the Host header, so that DSM doesn’t trigger a redirect.

---

<div class="post-metadata">

**Author:** ![Arano](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Arano](https://discourse.haproxy.org/u/Arano)\
**Post date:** [April 18, 2017, 8:43am UTC](https://discourse.haproxy.org/t/resolved-hap-docker-nas-redirecting-not-proxying/1172/3 "2017-04-18T08:43:56Z")

</div>

Toh ! Indeed, when my host header isn’t what it’s defined, my backend redirect 302 to its “good” host… which is a IP address…  
That’s sneaky.

Thanks a lot, I’ll practice Haproxy on a backend more friendly ^^
