nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.34k stars 323 forks source link

GeoIp module #937

Open ruudk opened 12 months ago

ruudk commented 12 months ago

I'm using ngx_http_geoip2_module with regular Nginx. Can I something similar for Unit?

I'd like to get geo info for IP's that hit my server.

tippexs commented 11 months ago

Thanks for bringing this up. At the moment we don't have a GeoIp implementation. I can think of some njs hacks to make it work but haven't tried it. The tricky part would be the performance impact of looking it up if not implemented I a efficient manner. I will keep you posted.

tippexs commented 8 months ago

Hi @ruudk sorry for comming back late on this! Quick question. Where do you want to have these information? In your access log? If so I can think of NJS and custom access log formats to get the information you need.

ruudk commented 5 months ago

We want to pass these values to our php-fpm server so that they appear as request headers on the PHP side.