-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtournament-infra.conf
54 lines (44 loc) · 1.64 KB
/
tournament-infra.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
# This doesn't strictly need to be part of the repo, but it's useful just to make sure we don't lose the config.
server {
listen 80;
server_name marc.hamishwhc.com;
return 301 https://$server_name$request_uri;
}
server {
server_name marc.hamishwhc.com;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/marc.hamishwhc.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/marc.hamishwhc.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
# Single Page Application Config
root /var/www/html;
location ~* ^/(index\.html)?$ {
# If / or /index.html, return the index (default) with cache off.
add_header Cache-Control "no-store, no-cache, must-revalidate";
expires 1y;
}
location / {
# For any file that is hit by try_files, turn cache on.
add_header Cache-Control "public";
# Redirect to @index location if not found.
try_files $uri $uri/ @index;
}
location @index {
# Don't cache index!
add_header Cache-Control "no-store, no-cache, must-revalidate";
expires 1y;
try_files /index.html =404;
}
location /api/ {
proxy_pass http://127.0.0.1:8000/;
}
location /bgio/ {
proxy_pass http://localhost:8081/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}