-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
73 lines (55 loc) · 2.21 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
#user www-data www-data;
pid logs/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 8192;
#thread_pool conns threads=1024 max_queue=0;
thread_pool weserv threads=1024 max_queue=65536;
events {
accept_mutex on;
accept_mutex_delay 500ms;
multi_accept on;
worker_connections 4096;
#worker_aio_requests 4096;
}
http {
charset utf-8;
tcp_nopush on;
tcp_nodelay on;
sendfile on;
sendfile_max_chunk 512k;
types_hash_max_size 1024;
server_names_hash_bucket_size 128;
aio threads=weserv;
directio 4m;
output_buffers 128 512k;
#aio_write off;
etag off;
max_ranges 0;
server_tokens off;
keepalive_timeout 300;
keepalive_requests 300;
client_body_timeout 10s;
send_timeout 5s;
reset_timedout_connection on;
# mimetypes
include /usr/local/openresty/nginx/conf/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'"$host" sn="$server_name" '
'rt=$request_time '
'ua="$upstream_addr" us="$upstream_status" '
'ut="$upstream_response_time" ul="$upstream_response_length" '
'cs=$upstream_cache_status' ;
log_format stats '$time_iso8601 $status $body_bytes_sent $request_time';
# switch off access and not found files
access_log off;
log_not_found off;
# log for errors
error_log logs/error.log error;
include /etc/nginx/conf.d/*.conf;
}