# Nginx before HAProxy - RPAF

**URL:** <https://discourse.haproxy.org/t/nginx-before-haproxy-rpaf/3245>\
**Category:** Help!\
**Created:** [November 22, 2018, 4:31pm UTC](https://discourse.haproxy.org/t/nginx-before-haproxy-rpaf/3245 "2018-11-22T16:31:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielfarkas](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/danielfarkas/32/685_2.png) [@danielfarkas](https://discourse.haproxy.org/u/danielfarkas)\
**Post date:** [November 22, 2018, 4:31pm UTC](https://discourse.haproxy.org/t/nginx-before-haproxy-rpaf/3245/1 "2018-11-22T16:31:35Z")

</div>

Hello,  
I have nginx before haproxy on my Load Balancer. Request is traveling in to haproxy with “proxy\_pass” directive. I set a header “X-Forwarded-For” and now, I need to log haproxy requests to logstash. But in log I get local IP adress of HAproxy. Is possible to set something like RPAF in haproxy?

Thank you !

---

<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:** [November 22, 2018, 4:58pm UTC](https://discourse.haproxy.org/t/nginx-before-haproxy-rpaf/3245/2 "2018-11-22T16:58:00Z")

</div>

Should be something like:

`http-request set-src hdr(x-forwarded-for)`

---

<div class="post-metadata">

**Author:** ![danielfarkas](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/danielfarkas/32/685_2.png) [@danielfarkas](https://discourse.haproxy.org/u/danielfarkas)\
**Post date:** [November 23, 2018, 10:35am UTC](https://discourse.haproxy.org/t/nginx-before-haproxy-rpaf/3245/3 "2018-11-23T10:35:37Z")

</div>

Awesome ! Thank you.
