-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
91 lines (75 loc) · 2.08 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
user www-data;
worker_processes 2; # or one worker per core
worker_rlimit_nofile 8192;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log warn;
events {
worker_connections 4096; # playing it safe; you can match `ulimit -n` here
use epoll;
multi_accept on;
}
http {
default_type application/octet-stream;
include mime_types;
include fastcgi_params;
include block_list;
index index.html index.php;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
keepalive_requests 100000;
types_hash_max_size 2048;
server_names_hash_bucket_size 128;
client_body_buffer_size 128k;
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 3m;
client_body_timeout 3m;
send_timeout 3m;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 1000;
gzip_types
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
application/atom+xml
font/truetype
font/opentype
application/vnd.ms-fontobject
image/svg+xml;
# An intentional default site/page to avoid random unintended defaults :)
server {
listen 80 default;
server_name _;
server_name_in_redirect off;
root /var/www/_default/htdocs;
error_page 404 /404.html;
expires 1M;
access_log off; # We really don't need to log these...
}
# Load auxiliary configuration files
include /etc/nginx/conf.d/*.conf;
# Load our virtual hosts: BAM!
include /etc/nginx/sites-enabled/*.conf;
}