-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
63 lines (50 loc) · 1.53 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
worker_processes 2;
daemon off;
error_log stderr;
events {
worker_connections 8096;
multi_accept on;
use epoll;
}
http {
# Buffer log writes to speed up IO, or disable them altogether
#access_log /var/log/nginx/access.log main buffer=16k;
#access_log off;
error_log stderr;
proxy_buffering on;
proxy_buffer_size 4k;
proxy_buffers 32 8k;
# Don't buffer larger responses to disk, serve them synchronously.
proxy_max_temp_file_size 0;
# Send HTTP response head in one packet instead of using partial frames
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
server_tokens off;
# Serves files and needs to use Nginx for transfers (this is only used internally and should only be exposed internally between machines)
# uwsgi --http :8007 --module ftphosting.wsgi.zipstream:application --honour-stdin
upstream zipservebackend {
server 127.0.0.1:8007;
}
# Serves the API
# uwsgi --http :8006 --module ftphosting.wsgi.smartfile:application --honour-stdin
upstream zipheaderbackend {
server 127.0.0.1:8006;
}
server {
listen 8000;
location /sendfile/ {
internal;
proxy_pass http://zipservebackend;
proxy_buffering off;
proxy_buffers 2 4m;
proxy_buffer_size 4m;
proxy_busy_buffers_size 4m;
}
location / {
proxy_pass http://zipheaderbackend;
proxy_redirect off;
proxy_set_header Host $http_host;
}
}
}