-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathasreview_https.conf
More file actions
63 lines (51 loc) · 1.77 KB
/
asreview_https.conf
File metadata and controls
63 lines (51 loc) · 1.77 KB
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
events {
worker_connections 1024;
}
http {
client_max_body_size 100M;
proxy_cache_path /var/cache/nginx/asreview keys_zone=asreview:20m max_size=500m;
upstream asreview_container {
server asreview:5006;
}
# redirect http to https
server {
listen [::]:80;
listen 80;
return 301 https://$http_host$request_uri;
}
# https
server {
listen [::]:443 ssl;
listen 443 ssl;
http2 on;
# certificates
ssl_certificate /etc/pemfiles/fullchain.pem;
ssl_certificate_key /etc/pemfiles/privkey.pem;
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_types application/javascript; # our css file is small and cached by browser
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_key $scheme://$host$uri$is_args$query_string;
location / {
proxy_pass https://asreview_container;
}
location = /favicon.ico {
proxy_pass https://asreview_container;
proxy_cache asreview;
proxy_cache_valid 200 100d;
proxy_ignore_headers Cache-Control;
add_header X-Proxy-Cache $upstream_cache_status;
}
location ^~ /static {
proxy_pass https://asreview_container;
proxy_cache asreview;
proxy_cache_valid 200 100d;
proxy_ignore_headers Cache-Control;
add_header X-Proxy-Cache $upstream_cache_status;
}
}
}