nginx routing based on ip address

keeyong nginx-forum at forum.nginx.org
Wed Feb 24 05:26:29 UTC 2016


I am wondering if it is possible to compute some kind of hash value from ip
address or do modulo operation on the last numeric value from ip address
(for example on 24 given 172.16.4.24)? Based on this, I want to send the
request to different endpoints (not to different servers). If this can be
done without installing any new module, that would be the best.

As far as I can see, I feel like I should do something similar using the
regex?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,264742,264742#msg-264742



More information about the nginx mailing list