Home  >  Q&A  >  body text

How does haproxy get the user's real IP sent from nginx?

The architecture mode is nginx -> haproxy -> apache

How does haproxy get the real IP passed by nginx?

过去多啦不再A梦过去多啦不再A梦2712 days ago1029

reply all(2)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-16 17:30:13

    Of course nginx adds a field to the http request header and forwards the real address to the backend. What are you thinking about?

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 17:30:13

    It’s very simple. Just add the following command in the configuration options
    option forwardfor except 127.0.0.1

    reply
    0
  • Cancelreply