forked from specify/web-asset-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
101 lines (92 loc) · 2.92 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
user nginx;
worker_processes 1;
error_log /dev/stderr;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
log_format main escape=json
'{'
'"time_local":"$time_local",'
'"remote_addr":"$remote_addr",'
'"remote_user":"$remote_user",'
'"request_id":"$request_id",'
'"request":"$request",'
'"status": "$status",'
'"body_bytes_sent":"$body_bytes_sent",'
'"request_time":"$request_time",'
'"upstream_response_time":"$upstream_response_time",'
'"upstream_connect_time":"$request_time",'
'"upstream_header_time":"$upstream_header_time",'
'"http_referrer":"$http_referer",'
'"http_user_agent":"$http_user_agent",'
'"upstream_addr":"$upstream_addr",'
'"upstream_status":"$upstream_status",'
'"http_x_forwarded_for":"$http_x_forwarded_for"'
'}';
access_log /dev/stdout main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 600s;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
resolver 127.0.0.11 ipv6=off valid=30s;
resolver_timeout 1s;
gzip on;
gzip_proxied off;
gzip_disable "msie6";
gzip_vary on;
gzip_comp_level 6;
gzip_min_length 256;
gzip_types
application/atom+xml
application/geo+json
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rdf+xml
application/rss+xml
application/xhtml+xml
application/xml
font/eot
font/otf
font/ttf
image/svg+xml
text/css
text/javascript
text/plain
text/xml;
client_max_body_size 1000g;
client_body_buffer_size 16k;
proxy_read_timeout 600s;
proxy_connect_timeout 10s;
proxy_send_timeout 600s;
send_timeout 600s;
uwsgi_read_timeout 600s;
uwsgi_connect_timeout 600s;
uwsgi_send_timeout 600s;
server {
listen 80 default_server;
server_name _;
uwsgi_buffer_size 128k;
uwsgi_buffers 4 256k;
uwsgi_busy_buffers_size 256k;
location / {
try_files $uri @image-server;
}
location @image-server {
uwsgi_pass image-server:29000;
include /etc/nginx/uwsgi_params;
uwsgi_param Host $host;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
uwsgi_param X-Request-Id $request_id;
}
}
}