Added snippit for cloudflare-proxy
This commit is contained in:
parent
c077a9acc6
commit
897a8e4301
58
Caddyfile
58
Caddyfile
@ -18,22 +18,56 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(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) {
|
(docker-proxy) {
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
|
|
||||||
handle_errors {
|
handle_errors {
|
||||||
@maintenance expression {http.error.status_code} == 502
|
@maintenance expression {http.error.status_code} == 502
|
||||||
rewrite @maintenance maintenance.html
|
rewrite @maintenance maintenance.html
|
||||||
@timeout expression {http.error.status_code} == 503
|
@timeout expression {http.error.status_code} == 503
|
||||||
rewrite @timeout timeout.html
|
rewrite @timeout timeout.html
|
||||||
|
|
||||||
root * /var/www/html
|
root * /var/www/html
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
-Server
|
-Server
|
||||||
}
|
}
|
||||||
|
|
||||||
reverse_proxy {args[0]}
|
reverse_proxy {args[0]}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user