Adds visitor dashboard and related features
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
# Map ISO timestamp to date-only string for daily log rotation
|
||||
map $time_iso8601 $log_date {
|
||||
~^(?<date>\d{4}-\d{2}-\d{2}) $date;
|
||||
default "unknown";
|
||||
}
|
||||
|
||||
log_format kmtn_json escape=json
|
||||
'{'
|
||||
'"time":"$time_iso8601",'
|
||||
'"remote_addr":"$remote_addr",'
|
||||
'"x_forwarded_for":"$http_x_forwarded_for"'
|
||||
'}';
|
||||
|
||||
access_log /logs/access-$log_date.log kmtn_json;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
Reference in New Issue
Block a user