Files

55 lines
1.7 KiB
Caddyfile

{
# General Options
#debug
email shark_xc@hotmail.com
servers 127.0.0.1:8003 {
#[::1]:8003
listener_wrappers {
proxy_protocol {
#timeout 2s
allow 127.0.0.1/32 ::1/128
#deny 10.0.0.0/8
#fallback_policy reject
}
tls
}
protocols h1 h2 h3
}
https_port 8003
}
http:// {
redir https://{host}:443{uri} permanent
}
#replace the domain, ask through tty
xxx.yyy.zzz {
bind 127.0.0.1 [::1]
encode gzip zstd
php_fastcgi unix//run/php/php7.4-fpm.sock
@proxypaths {
path /portainer /portainer/*
}
@notpaths {
not path /portainer /portainer/* /scilad /scilad/*
}
tls {
ciphers TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
curves x25519 secp521r1 secp384r1 secp256r1
alpn h3 h2 http/1.1
}
reverse_proxy @notpaths https://engineersblog.net {
header_up Host {upstream_hostport}
}
handle_path /scilad {
@websockets {
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @websockets 127.0.0.1:54442 {
# health_timeout 12h
}
}
reverse_proxy @proxypaths localhost:9000
root * /usr/share/caddy
file_server
}