0

If a Web application server (ex. nginx&php-fpm) is behind Load-Balancer such as AWS-ELB:

Client -> Load-Balancer -> Web Application server

To get the real client IP from Web application has two way to implement for me:

  1. Handle the forward IP on Web server like setting nginx real IP module.

  2. Handle the forward IP on Web application like changing to get IP by forward header from trust Proxy.

Which way is better over all? or is there has other better ways?

Thanks.

1 Answer 1

0

Finally I decide to handle the forward IP on Web server via nginx real IP module.

Pros:

  1. Handling on Web server could also solve the access.log IP problem.

Handling on Application which also need to do the same thing for Web server to make access log with correct IP.

  1. A little more performance.

  2. Web application does not need to know the network structure too deep, which could improve the specification of work.


If you are using Apache as Web server, mod_remoteip Module could do the same for real ip.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .