-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
62 lines (48 loc) · 1.8 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
user www-data;
worker_processes 8;
pid /var/run/nginx.pid;
worker_rlimit_nofile 100000;
events {
worker_connections 10000;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
error_log /dev/null;
#error_log /var/log/nginx/error.log debug;
log_format analytics '$time_iso8601»$remote_addr»$http_x_forwarded_for»$http_referer»$http_user_agent»$query_string';
#log_format upstream_time_log '$host $remote_addr - $remote_user [$time_local] '
# '"$request" $status $body_bytes_sent '
# '"$http_referer" "$http_user_agent" $request_time $upstream_response_time $upstream_response_length';
#access_log /var/log/nginx/access.log upstream_time_log;
access_log off;
sendfile on;
#tcp_nopush on;
#tcp_nodelay on;
server_tokens off;
# #Enable conservative gzip
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_comp_level 3;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# Websocket connection upgrade
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# SSL Options
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 24h;
ssl_buffer_size 4k;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES128:DH+AES128:ECDH+AES256:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
ssl_dhparam /etc/ssl/private/dhparam.pem;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=1800s;
resolver_timeout 10s;
include /etc/nginx/conf.d/*.http;
}