2021-06-01 14:52:03 +00:00
|
|
|
user ${username};
|
2020-04-13 07:52:26 +00:00
|
|
|
worker_processes ${worker_processes};
|
|
|
|
|
|
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections ${worker_connections};
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
include /etc/nginx/mime.types;
|
2024-03-03 11:44:41 +00:00
|
|
|
types {
|
|
|
|
application/javascript js mjs;
|
|
|
|
}
|
2020-04-13 07:52:26 +00:00
|
|
|
default_type application/octet-stream;
|
|
|
|
charset UTF-8;
|
|
|
|
override_charset on;
|
|
|
|
|
|
|
|
sendfile on;
|
|
|
|
#tcp_nopush on;
|
|
|
|
|
|
|
|
keepalive_timeout 15;
|
|
|
|
client_body_timeout 12;
|
|
|
|
client_header_timeout 12;
|
|
|
|
send_timeout 10;
|
|
|
|
|
|
|
|
access_log off;
|
|
|
|
error_log off;
|
|
|
|
|
2021-07-02 16:21:57 +00:00
|
|
|
client_body_buffer_size 16K;
|
|
|
|
client_header_buffer_size 4k;
|
2021-03-30 19:26:25 +00:00
|
|
|
client_max_body_size 1M;
|
2021-07-02 16:21:57 +00:00
|
|
|
large_client_header_buffers 4 8k;
|
2020-04-13 07:52:26 +00:00
|
|
|
|
2020-07-19 09:26:12 +00:00
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
default upgrade;
|
|
|
|
'' close;
|
|
|
|
}
|
|
|
|
|
2021-02-20 20:11:12 +00:00
|
|
|
# GDPR compatible IP smashinator 5000000
|
|
|
|
map $remote_addr $ip_anonym1 {
|
|
|
|
default 0.0.0;
|
|
|
|
"~(?P<ip>(\d+)\.(\d+))\.(\d+)\.\d+" $ip;
|
|
|
|
"~(?P<ip>[^:]+:[^:]+):" $ip;
|
|
|
|
}
|
|
|
|
map $remote_addr $ip_anonym2 {
|
|
|
|
default .0.0;
|
|
|
|
"~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" .0.0;
|
|
|
|
"~(?P<ip>[^:]+:[^:]+):" ::;
|
|
|
|
}
|
|
|
|
map $ip_anonym1$ip_anonym2 $ip_anonymized {
|
|
|
|
default 0.0.0.0;
|
|
|
|
"~(?P<ip>.*)" $ip;
|
|
|
|
}
|
2021-06-05 13:53:02 +00:00
|
|
|
|
2021-02-20 20:11:12 +00:00
|
|
|
log_format gdpr '$ip_anonymized - $remote_user [$time_local] '
|
|
|
|
'"$request" $status $body_bytes_sent '
|
|
|
|
'"<stripped>" "$http_user_agent"';
|
|
|
|
|
2021-06-05 13:53:02 +00:00
|
|
|
log_format anon_timing '[$time_local] $request_time $upstream_response_time "$request" $status';
|
|
|
|
|
2020-04-13 07:52:26 +00:00
|
|
|
include /etc/nginx/sites/*;
|
|
|
|
}
|