forked from fleek-network/ursa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.conf
75 lines (59 loc) · 2.08 KB
/
app.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
proxy_cache_path /cache keys_zone=nodecache:100m levels=1:2 inactive=31536000s max_size=10g use_temp_path=off;
server {
listen 80;
listen [::]:80;
server_name node.ursa.earth www.node.ursa.earth;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location /stub_status {
stub_status;
}
proxy_redirect off;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 128k;
location / {
add_header content-type application/vnd.ipld.raw;
add_header content-type application/vnd.ipld.car;
add_header content-type application/octet-stream;
add_header cache-control public,max-age=31536000,immutable;
proxy_cache nodecache;
proxy_cache_valid 200 31536000s;
add_header X-Proxy-Cache $upstream_cache_status;
proxy_cache_methods GET HEAD POST;
proxy_cache_key "$request_uri|$request_body";
client_max_body_size 1G;
proxy_pass http://ursa:4069;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name node.ursa.earth www.node.ursa.earth;
server_tokens off;
# SSL code
ssl_certificate /etc/letsencrypt/live/ursa.earth/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ursa.earth/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location /stub_status {
stub_status;
}
location / {
add_header content-type application/vnd.ipld.raw;
add_header content-type application/vnd.ipld.car;
add_header content-type application/octet-stream;
add_header cache-control public,max-age=31536000,immutable;
proxy_cache nodecache;
proxy_cache_valid 200 31536000s;
add_header X-Proxy-Cache $upstream_cache_status;
proxy_cache_methods GET HEAD POST;
proxy_cache_key "$request_uri|$request_body";
client_max_body_size 1G;
proxy_pass http://ursa:4069;
}
}