-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
64 lines (47 loc) · 1.51 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
# ==== DECODE NGINX PROXY ====
# only used to serve static now in /html
server {
listen 80;
server_name decode.amsterdam _;
return 301 https://decode.amsterdam$request_uri;
}
server {
server_name decode.amsterdam _;
listen *:443 ssl default_server deferred;
root /html;
access_log /var/log/nginx/static_access.log;
error_log /var/log/nginx/static_error.log;
ssl_certificate /certs/decode.amsterdam/fullchain.pem;
ssl_certificate_key /certs/decode.amsterdam/privkey.pem;
# serveer static hier
location / {
try_files $uri $uri/ /index.html;
}
location /.well-known {
alias /domains/decode.amsterdam/.well-known;
}
}
# API.DECODE.AMSTERDAM
server {
listen 80;
server_name api.decode.amsterdam;
return 301 https://api.decode.amsterdam$request_uri;
}
server {
listen 443 ssl;
server_name api.decode.amsterdam;
ssl_certificate /certs/api.decode.amsterdam/fullchain.pem;
ssl_certificate_key /certs/api.decode.amsterdam/privkey.pem;
location / {
resolver 127.0.0.1 valid=30s;
proxy_pass http://37.97.148.6:5005;
# websockets see: https://chrislea.com/2013/02/23/proxying-websockets-with-nginx/
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
location /.well-known {
alias /domains/api.decode.amsterdam/.well-known;
}
}