fix: access log
This commit is contained in:
parent
467d01a61b
commit
d9950661ef
1 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,6 @@ pid /run/nginx.pid;
|
|||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
error_log syslog:server=unix:/dev/log;
|
||||
access_log syslog:server=unix:/dev/log combined_host;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
|
@ -73,16 +72,18 @@ stream {
|
|||
$geoip2_data_longitude location longitude;
|
||||
}
|
||||
|
||||
log_format basic 'country=$geoip2_data_country_iso_code lat=$geoip2_data_latitude long=$geoip2_data_longitude '
|
||||
log_format geoip 'country=$geoip2_data_country_iso_code lat=$geoip2_data_latitude long=$geoip2_data_longitude '
|
||||
'ip=$remote_addr '
|
||||
'protocol=$protocol server_name=$ssl_preread_server_name upstream=$selected_upstream status=$status bytes_sent=$bytes_sent bytes_received=$bytes_received '
|
||||
'session_time=$session_time';
|
||||
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:443 default_server;
|
||||
listen [::]:443 default_server;
|
||||
server_name _;
|
||||
proxy_pass $selected_upstream;
|
||||
access_log syslog:server=unix:/dev/log geoip;
|
||||
|
||||
proxy_protocol on;
|
||||
include /etc/nginx/partials/server.conf;
|
||||
|
|
Loading…
Reference in a new issue