forked from skylines-project/skylines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Caddyfile
71 lines (57 loc) · 1.63 KB
/
Caddyfile
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
# https://caddyserver.com configuration for the production server
skylines.aero {
log /home/skylines/caddy/caddy.log
root /home/skylines/src/skylines/frontend/static
gzip
header / Strict-Transport-Security "max-age=31536000;"
rewrite {
if {path} not_starts_with /api
if {path} not_starts_with /files
if {path} not_starts_with /client.php
if {path} not_starts_with /track.php
if {path} not_starts_with /widgets
if {path} not_starts_with /mapproxy
if {path} not_starts_with /mapserver
to {path} /
}
expires {
match ^/assets/.*\.css$ 1y
match ^/assets/.*\.js$ 1y
match ^/fonts 1y
match ^/api 0s
match ^/client.php 0s
match ^/track.php 0s
match ^/widgets 0s
match ^/mapproxy 7d
match ^/mapserver 0s
}
proxy /api unix:/run/skylines/skylines-uwsgi.socket {
transparent
}
proxy /files unix:/run/skylines/skylines-uwsgi.socket {
transparent
}
proxy /client.php unix:/run/skylines/skylines-uwsgi.socket {
transparent
}
proxy /track.php unix:/run/skylines/skylines-uwsgi.socket {
transparent
}
proxy /widgets unix:/run/skylines/skylines-uwsgi.socket {
transparent
}
proxy /mapproxy unix:/run/skylines/mapproxy-uwsgi.socket {
transparent
without /mapproxy
}
proxy /mapserver unix:/run/skylines/mapserver-uwsgi.socket {
transparent
without /mapserver
}
}
www.skylines.aero {
redir https://skylines.aero{uri}
}
maps.skylines.aero {
redir https://skylines.aero{uri}
}