-
Notifications
You must be signed in to change notification settings - Fork 9
/
nginx.conf.j2
53 lines (42 loc) · 1.02 KB
/
nginx.conf.j2
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
limit_req_zone $binary_remote_addr zone=one:10m rate=7r/s;
server {
listen 3009;
{% if ssl %}
listen 311 ssl;
ssl_certificate /ssl/ssl_cert;
ssl_certificate_key /ssl/ssl_key;
{% endif %}
proxy_read_timeout 500s;
proxy_connect_timeout 500s;
proxy_send_timeout 500s;
error_log /var/log/nginx/error.log warn;
client_max_body_size 20m;
server_name localhost;
limit_req zone=one burst=10;
location / {
include uwsgi_params;
uwsgi_read_timeout 500s;
uwsgi_socket_keepalive on;
uwsgi_pass 127.0.0.1:3010;
}
location /nginx-status {
stub_status;
allow 127.0.0.1;
deny all;
}
}
server {
listen 80;
{% if ssl %}
listen 443 ssl;
ssl_certificate /ssl/ssl_cert;
ssl_certificate_key /ssl/ssl_key;
{% endif %}
error_log /var/log/nginx/error.log warn;
client_max_body_size 20m;
server_name localhost;
limit_req zone=one burst=50;
location / {
root /filestorage;
}
}