forked from download13/ipfstube
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
62 lines (48 loc) · 1.18 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
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log off;
error_log /dev/stdout;
gzip on;
etag on;
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
server {
listen 80 default_server;
location /.well-known/acme-challenge {
default_type "text/plain";
root /tmp/letsencrypt-auto;
try_files $uri =404;
}
location / {
return 302 https://$host$request_uri;
}
}
server {
listen 443 ssl default_server;
server_name ipfstube.erindachtler.me;
ssl_certificate /etc/letsencrypt/live/ipfstube.erindachtler.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ipfstube.erindachtler.me/privkey.pem;
root public;
index index.html;
add_header Cache-Control "public";
location /v/ {
try_files /player.html =404;
}
location = /upload {
proxy_set_header Origin "";
proxy_set_header Referer "";
proxy_set_header X-Requested-With "";
proxy_pass http://ipfsnode:5001/api/v0/add;
client_max_body_size 200M;
}
location /ipfs/ {
proxy_pass http://ipfsnode:8080/ipfs/;
}
location /ipns/ {
proxy_pass http://ipfsnode:8080/ipns/;
}
}
}