-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
45 lines (35 loc) · 1.03 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
user nginx;
worker_processes 1;
daemon off;
error_log /app/error.log;
pid /app/nginx.pid;
events {
worker_connections 1024;
}
http {
# performance tuning
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
keepalive_requests 100;
# caches information about open file descriptors for freqently accessed files.
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
# attack mitigation
reset_timedout_connection on;
client_body_timeout 10;
send_timeout 2;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format extended '$remote_addr - $remote_user [$time_iso8601] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'| $request_time $pipe $connection_requests $gzip_ratio $ssl_protocol/$ssl_cipher';
access_log off;
gzip off;
include /etc/nginx/sites-enabled/*;
}