-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
103 lines (94 loc) · 1.9 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
101
102
103
user www-data www-data;
worker_processes auto;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
use epoll;
multi_accept on;
}
http {
# Basic Settings
# Careful with AIO if using Proxmox
aio threads;
server_tokens off;
autoindex off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
client_max_body_size 120m;
# Uncomment if Modsecurity enaabled
#modsecurity on;
#modsecurity_rules_file /etc/nginx/modsec/main.conf;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Timeouts
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 90;
reset_timedout_connection on;
# Logging Settings
# Monitor Access Logs via Virtual Hosts
access_log off;
error_log /var/log/nginx/error.log;
# Brotli Settings
# Turn on if compiled
brotli off;
#brotli_static on;
brotli_comp_level 5;
brotli_buffers 16 8k;
brotli_min_length 256;
brotli_types
text/plain
text/css
text/js
text/xml
text/javascript
font/eot
font/opentype
font/otf
font/ttf
application/javascript
application/x-javascript
application/json
application/ld+json
application/xml
application/rss+xml
application/atom+xml
application/xhtml+xml
image/x-icon
image/svg+xml;
# Gzip Settings
gzip on;
gzip_disable "msie6";
#gzip_static on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
gzip_buffers 16 8k;
gzip_min_length 256;
gzip_http_version 1.1;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
font/eot
font/opentype
font/otf
font/ttf
application/javascript
application/x-javascript
application/json
application/ld+json
application/xml
application/rss+xml
application/atom+xml
application/xhtml+xml
image/x-icon
image/svg+xml;
# Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.conf;
}