Update README.md
This commit is contained in:
parent
a0accbeb6f
commit
811b4c0e67
1 changed files with 2 additions and 2 deletions
|
@ -109,7 +109,7 @@ Nginx needs to be compiled with the geoip2 module: https://github.com/leev/ngx_h
|
||||||
```nginx
|
```nginx
|
||||||
geoip2 /config/geoip2db/GeoLite2-City.mmdb {
|
geoip2 /config/geoip2db/GeoLite2-City.mmdb {
|
||||||
auto_reload 5m;
|
auto_reload 5m;
|
||||||
$geoip2_data_country_code country iso_code;
|
$geoip2_data_country_iso_code country iso_code;
|
||||||
$geoip2_data_city_name city names en;
|
$geoip2_data_city_name city names en;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ log_format custom '$remote_addr - $remote_user [$time_local]'
|
||||||
'"$request" $status $body_bytes_sent'
|
'"$request" $status $body_bytes_sent'
|
||||||
'"$http_referer" $host "$http_user_agent"'
|
'"$http_referer" $host "$http_user_agent"'
|
||||||
'"$request_time" "$upstream_connect_time"'
|
'"$request_time" "$upstream_connect_time"'
|
||||||
'"$geoip2_data_city_name" "$geoip2_data_country_code"';
|
'"$geoip2_data_city_name" "$geoip2_data_country_iso_code"';
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Set the access log use the `custom` log format.
|
2. Set the access log use the `custom` log format.
|
||||||
|
|
Loading…
Reference in a new issue