parent
148d0f14c5
commit
bdb933c3e5
|
@ -45,7 +45,6 @@
|
|||
- git
|
||||
- libpython3-dev
|
||||
- zlib1g-dev
|
||||
- geoip-database
|
||||
tags:
|
||||
- install
|
||||
- reconfigure
|
||||
|
|
|
@ -99,41 +99,6 @@ http {
|
|||
image/svg+xml;
|
||||
{% endif %}
|
||||
|
||||
|
||||
map $http_referer $httpReferer {
|
||||
default "$http_referer";
|
||||
"" "(direct)";
|
||||
}
|
||||
|
||||
map $http_user_agent $httpAgent {
|
||||
default "$http_user_agent";
|
||||
"" "Unknown";
|
||||
}
|
||||
|
||||
map $geoip_country_code $geoIP {
|
||||
default "$geoip_country_code";
|
||||
"" "Unknown";
|
||||
}
|
||||
|
||||
geoip_country /usr/share/GeoIP/GeoIP.dat;
|
||||
|
||||
log_format json_analytics escape=json '{'
|
||||
'"request_id": "$request_id", '
|
||||
'"server_name": "$server_name", '
|
||||
'"request_uri": "$request_uri", '
|
||||
'"request_time": "$request_time", '
|
||||
'"http_referer": "$httpReferer", '
|
||||
'"http_user_agent": "$httpAgent", '
|
||||
'"remote_addr": "$remote_addr", '
|
||||
'"http_x_forwarded_for": "$http_x_forwarded_for", '
|
||||
'"status": "$status", '
|
||||
'"bytes_sent": "$bytes_sent", '
|
||||
'"time_local": "$time_local", '
|
||||
'"ssl_protocol": "$ssl_protocol", '
|
||||
'"ssl_cipher": "$ssl_cipher", '
|
||||
'"geoip_country_code": "$geoIP"'
|
||||
'}';
|
||||
|
||||
{% if nginx_modsecurity is defined %}
|
||||
modsecurity on;
|
||||
modsecurity_rules_file /etc/nginx/modsecurity_includes.conf;
|
||||
|
|
|
@ -8,7 +8,6 @@ server {
|
|||
index {{ item.index|default('index.html index.htm')}};
|
||||
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined buffer=20m flush=5m;
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.json.log json_analytics;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log warn;
|
||||
|
||||
{% include 'partials/ssl.j2' %}
|
||||
|
|
|
@ -8,7 +8,6 @@ server {
|
|||
index {{ item.index|default('index.html index.htm')}};
|
||||
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined buffer=20m flush=5m;
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.json.log json_analytics;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log warn;
|
||||
|
||||
{% include 'partials/ssl.j2' %}
|
||||
|
|
|
@ -5,7 +5,6 @@ server {
|
|||
{% include 'partials/header.j2' %}
|
||||
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.log combined; # buffer=20m flush=5m;
|
||||
access_log /var/log/nginx/{{ item.server_name[0] }}.access.json.log json_analytics;
|
||||
error_log /var/log/nginx/{{ item.server_name[0] }}.error.log;
|
||||
|
||||
include /etc/nginx/conf.d/proxy.conf;
|
||||
|
|
Loading…
Reference in New Issue