-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
107 lines (85 loc) · 1.96 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
events {}
http {
ssl_certificate /run/secrets/commontheory_fullchain.pem;
ssl_certificate_key /run/secrets/commontheory_privkey.pem;
upstream ipfs_gateway {
server cidhookd:8080;
}
server {
listen 443 ssl;
server_name dnslink-cid-badge.commontheory.io;
gzip on;
location / {
proxy_set_header Host $host;
proxy_pass http://dnslink-cid-badge:3000;
}
}
server {
listen 443 ssl;
server_name cidhookd.commontheory.io;
location / {
# 10 minute timeout as ipfs resolution can take a while
proxy_read_timeout 600s;
proxy_pass http://cidhookd:3000;
}
}
# Proxies the path to an IPFS gateway
server {
listen 443 ssl;
server_name gateway.commontheory.io;
gzip on;
location / {
proxy_read_timeout 600s;
proxy_set_header Host "";
proxy_pass http://ipfs_gateway;
}
}
# Serves a single asset and doesn't pass path to IPFS
# Use for single page web apps
server {
listen 443 ssl;
server_name commontheory.io;
server_name develop.commontheory.io;
gzip on;
rewrite /.* / last;
location / {
proxy_read_timeout 600s;
proxy_set_header Host $host;
proxy_pass http://ipfs_gateway/;
}
}
# server {
# listen 443 ssl;
#
# server_name rinkeby.commontheory.io;
#
# location / {
# proxy_set_header Host $host;
# proxy_pass http://rinkeby:8545;
# }
# }
#
# server {
# listen 443 ssl;
#
# server_name homestead.commontheory.io;
#
# location / {
# proxy_set_header Host $host;
# proxy_pass http://homestead:8545;
# }
# }
# Redirect ctheory to commontheory
server {
listen 443 ssl;
server_name ctheory.io;
ssl_certificate /run/secrets/ctheory_fullchain.pem;
ssl_certificate_key /run/secrets/ctheory_privkey.pem;
return 301 https://commontheory.io;
}
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
}