mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 13:16:17 +00:00
fix: minor bugfixes & border cases
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
# Enable metrics for Prometheus
|
||||
metrics
|
||||
|
||||
# Logging - console for Docker logs and file for CrowdSec/Promtail
|
||||
# Logging - JSON format required for Promtail label extraction
|
||||
log {
|
||||
level INFO
|
||||
output file /var/log/caddy/access.log
|
||||
format console
|
||||
format json
|
||||
}
|
||||
|
||||
# Allow CrowdSec globally
|
||||
@@ -20,5 +20,14 @@
|
||||
|
||||
}
|
||||
|
||||
# Reusable WAF snippet — use `import waf` in any site block
|
||||
(waf) {
|
||||
coraza_waf {
|
||||
directives `
|
||||
Include /etc/caddy/coraza.conf
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
# Import all site configurations from sites-enabled directory
|
||||
import /etc/caddy/sites-enabled/*.Caddyfile
|
||||
|
||||
@@ -7,13 +7,22 @@
|
||||
# file_server
|
||||
# }
|
||||
|
||||
# Example: Reverse Proxy for service running in docker container (must be under caddy_net)
|
||||
# api.example.com {
|
||||
# coraza_waf {
|
||||
# directives `
|
||||
# Include /etc/caddy/coraza.conf
|
||||
# `
|
||||
# }
|
||||
# Example: Reverse Proxy for a Docker container app
|
||||
#
|
||||
# Requirements: the app container must be on caddy_net.
|
||||
# Add the following to your app's docker-compose.yml:
|
||||
#
|
||||
# services:
|
||||
# my-app:
|
||||
# image: my-app:latest
|
||||
# networks:
|
||||
# - caddy_net
|
||||
#
|
||||
# networks:
|
||||
# caddy_net:
|
||||
# external: true
|
||||
#
|
||||
# api.example.com {
|
||||
# import waf
|
||||
# reverse_proxy * http://{CONTAINER_NAME}:{CONTAINER_PORT}
|
||||
# }
|
||||
|
||||
Reference in New Issue
Block a user