Compare commits

..

2 Commits

View File

@ -2,7 +2,7 @@ user www-data;
worker_processes auto; worker_processes auto;
pid /run/nginx.pid; pid /run/nginx.pid;
#include /etc/nginx/modules-enabled/*.conf; include /etc/nginx/modules-enabled/*.conf;
events { events {
worker_connections 768; worker_connections 768;
@ -52,17 +52,19 @@ http {
# Logging Settings # Logging Settings
## ##
#geoip2 /etc/GeoLite2-Country.mmdb { geoip2 /var/lib/GeoIP/GeoLite2-Country.mmdb {
# auto_reload 5m; auto_reload 5m;
# $geoip2_metadata_country_build metadata build_epoch; $geoip2_metadata_country_build metadata build_epoch;
# $geoip2_data_country_code default=US source=$http_x_forwarded_for country iso_code; $geoip2_data_country_code default=US source=$http_x_forwarded_for country iso_code;
# $geoip2_data_country_name source=$http_x_forwarded_for country names en; $geoip2_data_country_name source=$http_x_forwarded_for country names en;
#} }
#geoip2 /etc/GeoLite2-City.mmdb { geoip2 /var/lib/GeoIP/GeoLite2-City.mmdb {
# $geoip2_data_city_name source=$http_x_forwarded_for city names en; $geoip2_data_city_name source=$http_x_forwarded_for city names en;
# $geoip2_data_time_zone source=$http_x_forwarded_for location time_zone; $geoip2_data_latitude location latitude;
#} $geoip2_data_longitude location longitude;
$geoip2_data_time_zone source=$http_x_forwarded_for location time_zone;
}
log_format json_analytics escape=json '{' log_format json_analytics escape=json '{'
'"msec": "$msec", ' # request unixtime in seconds with a milliseconds resolution '"msec": "$msec", ' # request unixtime in seconds with a milliseconds resolution
@ -101,8 +103,11 @@ http {
'"server_protocol": "$server_protocol", ' # request protocol, like HTTP/1.1 or HTTP/2.0 '"server_protocol": "$server_protocol", ' # request protocol, like HTTP/1.1 or HTTP/2.0
'"pipe": "$pipe", ' # "p" if request was pipelined, "." otherwise '"pipe": "$pipe", ' # "p" if request was pipelined, "." otherwise
'"gzip_ratio": "$gzip_ratio", ' '"gzip_ratio": "$gzip_ratio", '
'"http_cf_ray": "$http_cf_ray"' '"http_cf_ray": "$http_cf_ray",'
#'"geoip_country_code": "$geoip_country_code"' '"geoip_city_name": "$geoip2_data_city_name",'
'"geoip_latitude": "$geoip2_data_latitude",'
'"geoip_longitude": "$geoip2_data_longitude",'
'"geoip_country_code": "$geoip2_data_country_code"'
'}'; '}';