forked from insekticid/docker-piwik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
53 lines (43 loc) · 1.32 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
user www-data;
worker_processes auto;
pid /run/nginx.pid;
#daemon off;
events {
worker_connections 768;
multi_accept on;
use epoll;
}
http {
set_real_ip_from 10.42.0.0/16;
real_ip_recursive on;
real_ip_header X-Forwarded-For;
log_format addHeaderlog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$request_body" "$http_Authorization" "$http_x_duid" "$http_x_ver" "$upstream_http_x_rqid"';
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 2048;
client_max_body_size 20M;
add_header X-Frame-Options SAMEORIGIN;
add_header Strict-Transport-Security max-age=16000000;
add_header X-Content-Type-Options nosniff;
include /etc/nginx/mime.types;
default_type application/octet-stream;
#do not log 20x and 30x
map $status $loggable {
~^[23] 0;
default 1;
}
fastcgi_hide_header Server;
fastcgi_hide_header X-Powered-By;
access_log /proc/self/fd/2 combined if=$loggable;
access_log /proc/self/fd/1 addHeaderlog;
error_log /proc/self/fd/2;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-available/*;
open_file_cache off; # Disabled for issue 619
charset UTF-8;
}