adussarps commented on issue #10626: URL: https://github.com/apache/apisix/issues/10626#issuecomment-2047318534
> I also encountered the same problem. Nginx forwards to apisix at the 4th layer. I have already configured the proxy protocol in nginx, and apisix should also be configured to support the proxy protocol. Generally, we want to read the real IP of the client. But I don't understand how to configure the proxy protocol in apisix. I found the following configuration: > > ``` > #proxy_protocol: # Proxy Protocol configuration > # listen_http_port: 9181 # The port with proxy protocol for http, it differs from node_listen and admin_listen. > # This port can only receive http request with proxy protocol, but node_listen & admin_listen > # can only receive http request. If you enable proxy protocol, you must use this port to > # receive http request with proxy protocol > # listen_https_port: 9182 # The port with proxy protocol for https > # enable_tcp_pp: true # Enable the proxy protocol for tcp proxy, it works for stream_proxy.tcp option > # enable_tcp_pp_to_upstream: true # Enables the proxy protocol to the upstream server > ``` > > I tried to verify and found that listen_http_port must be configured. At this time, my apisix listens on port 80, so listen_http_port cannot be configured as port 80. Do I have to separate the data with proxy protocol from the data without proxy protocol? > > From the comments in the configuration, can I only modify the listen, such as changing it to 8020, and then use listen_http_port as the entry point for all my traffic, which means the listen port is abandoned? Do I need to use it like this? > > ``` > apisix: > node_listen: > - 8020 > ... > proxy_protocol: > listen_http_port: 80 > listen_https_port: 443 > enable_tcp_pp_to_upstream: true > ``` Does modifying this config did it for you ? Did you manage to listen to http traffic on port 80 with proxy_protocol activated? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
