-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
72 lines (61 loc) · 1.71 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
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
http {
charset utf-8;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
log_format main escape=json 'vvvvvvvvvv\nsite="$server_name" server="$host" dest_port="$server_port" dest_ip="$server_addr" '
'src="$remote_addr" src_ip="$realip_remote_addr" user="$remote_user" '
'time_local="$time_local" protocol="$server_protocol" status="$status" '
'bytes_out="$body_bytes_sent" bytes_in="$upstream_response_length" '
'http_referer="$http_referer" http_user_agent="$http_user_agent" '
'uri_path="$uri" '
'http_method="$request_method" request_body="$request_body"\n^^^^^^^^^^';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 30;
gzip on;
gzip_buffers 32 16k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
text/xml
application/xml
application/atom+xml
application/rss+xml
application/xhtml+xml
image/svg+xml
text/javascript
application/javascript
application/x-javascript
text/x-json
application/json
application/x-web-app-manifest+json
text/css
text/plain
text/x-component
font/opentype
application/x-font-ttf
application/vnd.ms-fontobject
image/x-icon;
gzip_disable "msie6";
# default virtual host
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
deny all;
return 404;
}
include /etc/nginx/conf.d.correct/*.conf;
}