-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaddyfile
47 lines (43 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
{
https_port 20000 <-- <🚨УДАЛИ ЭТОТ КОММЕНТАРИЙ!!!🚨> в конфиге xray в Dest следует указать следующее: 127.0.0.1:20000
default_bind 127.0.0.1
servers {
listener_wrappers {
proxy_protocol {
allow 127.0.0.1/32
}
tls
}
}
auto_https disable_redirects
}
https://<🚨your-domain.live🚨> {
@marzban expression path('/🚨ТУТ ПУТЬ ПАНЕЛИ🚨/*') || path('/🚨ТУТ ПУТЬ ПОДПИСКИ🚨/*') || path('/api/*') || path('/docs/*') || path('/redoc/*') || path('/openapi.json/*') || path('/statics/*')
handle @marzban {
reverse_proxy 127.0.0.1:8000 <-- <🚨УДАЛИ ЭТОТ КОММЕНТАРИЙ!!!🚨> Если у тебя Marzban висит на другом порту, то замени его здесь
}
root * /var/www/caddy <-- <🚨УДАЛИ ЭТОТ КОММЕНТАРИЙ!!!🚨> В ЭТОЙ ПАПКЕ ДОЛЖЕН БЫТЬ МАСКИРОВОЧНЫЙ САЙТ (index.html обязательно, стили, скрипты и др. по необходимости)
file_server
redir /index.html /
log {
output file /var/lib/caddy/access.log {
roll_size 100mb
roll_keep 5
}
}
}
https://<🚨Your.VPS.Server.IP🚨> {
tls internal
respond * 204
}
:80 {
bind 0.0.0.0
respond * 204
}
http://<🚨your-domain.live🚨>, http://www.<🚨your-domain.live🚨> {
bind 0.0.0.0
redir https://<🚨your-domain.live🚨>{uri} permanent
}
https://www.<🚨your-domain.live🚨> {
redir https://<🚨your-domain.live🚨>{uri} permanent
}