49 lines
818 B
Caddyfile
49 lines
818 B
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
|
||
|
}
|
||
|
}
|
||
|
|
||
|
(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
|
||
|
}
|
||
|
}
|