nginx/templates/conf.d/geoip.conf

22 lines
501 B
Plaintext
Raw Normal View History

2023-08-30 12:12:15 +00:00
{% if nginx__geoip_country %}
geoip_country {{ nginx__geoip_country }};
{% else %}
#geoip_country path/to/GeoIP.dat;
{% endif %}
{% if nginx__geoip_city %}
geoip_city {{ nginx__geoip_city }};
{% else %}
#geoip_city path/to/GeoLiteCity.dat;
{% endif %}
{% for geoip2 in nginx__geoip2 %}
geoip2 {{ geoip2.file }} {
2023-08-30 13:32:15 +00:00
{% if geoip2.auto_reload | default(False) %}
2023-08-30 13:25:39 +00:00
auto_reload {{ geoip2.auto_reload }};
{% endif %}
2023-08-30 12:12:15 +00:00
{% for map in geoip2.maps %}
${{ map.var }} {{ map.path }};
{% endfor %}
}
{% endfor %}