83 lines
1.2 KiB
Caddyfile
83 lines
1.2 KiB
Caddyfile
{
|
|
#admin off
|
|
#auto_https disable_redirects
|
|
#debug true
|
|
email deon@dege.au
|
|
#log {
|
|
# level DEBUG
|
|
#}
|
|
#order abort before handle
|
|
http_port 80
|
|
https_port 443
|
|
|
|
servers :80 {
|
|
name http
|
|
}
|
|
servers :443 {
|
|
name https
|
|
}
|
|
}
|
|
|
|
(cloudflare-proxy) {
|
|
tls /data/ssl/cloudflare/au.dcml.crt /data/ssl/cloudflare/au.dcml.key {
|
|
client_auth {
|
|
mode require_and_verify
|
|
trust_pool file {
|
|
pem_file /data/ssl/cloudflare/client.crt
|
|
}
|
|
}
|
|
}
|
|
|
|
encode zstd gzip
|
|
|
|
handle_errors {
|
|
@maintenance expression {http.error.status_code} == 502
|
|
rewrite @maintenance maintenance.html
|
|
@timeout expression {http.error.status_code} == 503
|
|
rewrite @timeout timeout.html
|
|
|
|
root * /var/www/html
|
|
file_server
|
|
}
|
|
|
|
header {
|
|
-Server
|
|
}
|
|
|
|
reverse_proxy {args[0]} {
|
|
transport http {
|
|
tls
|
|
tls_insecure_skip_verify
|
|
}
|
|
}
|
|
}
|
|
|
|
(docker-proxy) {
|
|
encode zstd gzip
|
|
|
|
handle_errors {
|
|
@maintenance expression {http.error.status_code} == 502
|
|
rewrite @maintenance maintenance.html
|
|
@timeout expression {http.error.status_code} == 503
|
|
rewrite @timeout timeout.html
|
|
|
|
root * /var/www/html
|
|
file_server
|
|
}
|
|
|
|
header {
|
|
-Server
|
|
}
|
|
|
|
reverse_proxy {args[0]}
|
|
}
|
|
|
|
import /etc/caddy/sites/*.conf
|
|
|
|
# Abort any http requests to a site we dont have configured
|
|
http:// {
|
|
handle {
|
|
abort
|
|
}
|
|
}
|