-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
54 lines (45 loc) · 1.41 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
worker_processes 1;
error_log /dev/null;
pid /dev/null;
worker_rlimit_nofile 8192;
user root root;
events {
worker_connections 4096; ## Default: 1024
}
http {
upstream gunicorn {
server site:5000;
}
server {
listen 80;
client_max_body_size 1G;
keepalive_timeout 60s;
server_name web;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
add_header X-Content-Type-Options nosniff;
access_log /dev/null;
error_log /dev/null;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript image/jpeg image/png ;
location ~ "\.(jpg|png)$" {
root /usr/share/nginx/html;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Protocol https;
proxy_set_header X-Forwarded-Ssl on;
proxy_redirect off;
proxy_pass http://gunicorn;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
}
}