-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
executable file
·100 lines (72 loc) · 2.55 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
user nginx;
worker_processes auto;
# worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
# multi_accept on;
# use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
keepalive_timeout 65;
keepalive_requests 100000;
types_hash_max_size 2048;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
# client_body_buffer_size 16k;
# client_max_body_size 10m;
# client_header_buffer_size 1k;
# large_client_header_buffers 4 4k;
# output_buffers 1 32k;
# postpone_output 1460;
# client_header_timeout 10s;
# client_body_timeout 10s;
# reset_timedout_connection on;
# send_timeout 10s;
# limit_conn_zone $binary_remote_addr zone=addr:5m;
# limit_conn addr 100;
# open_file_cache max=100000 inactive=20s;
# open_file_cache_valid 30s;
# open_file_cache_min_uses 2;
# open_file_cache_errors on;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# block ip
include /etc/nginx/snippets/BlocksIP.conf;
##
# Logging Settings
##
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" $request_time '
'"$http_user_agent" "$http_x_forwarded_for"';
# log_format main '$http_x_forwarded_for - $remote_user [$time_local] "$host" "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" $request_time';
access_log /var/log/nginx/access.log main;
# error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_min_length 1000;
gzip_proxied any;
gzip_disable "msie6";
gzip_http_version 1.0;
gzip_types text/css text/plain text/xml text/javascript application/x-javascript application/javascript application/json application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/xml application/xml+rss font/eot font/opentype font/otf image/svg+xml image/vnd.microsoft.icon;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
# include /etc/nginx/sites-enabled/*;
}