-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
50 lines (39 loc) · 1.16 KB
/
Caddyfile
File metadata and controls
50 lines (39 loc) · 1.16 KB
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
# Caddy Configuration for Single-Node BosBase Deployment
# Place this file in /etc/caddy/Caddyfile
yourdomain.com {
# Handle /booster* requests to port 2678
handle /booster* {
reverse_proxy localhost:2678 {
header_up Upgrade {http.upgrade}
header_up Connection {http.connection}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
header_up X-Forwarded-Host {host}
transport http {
max_conns_per_host 0
}
}
}
# Handle all other requests
handle {
reverse_proxy localhost:8090 {
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
header_up X-Forwarded-Host {host}
transport http {
max_conns_per_host 0
}
}
}
# Logging
log {
output file /var/log/caddy/bosbase.log
format json
}
}
# Redirect www to non-www
www.yourdomain.com {
redir https://yourdomain.com{uri} permanent
}