Update Readme
This commit is contained in:
73
README.md
73
README.md
@@ -1,7 +1,74 @@
|
|||||||
# Caddy
|
# Caddy
|
||||||
|
|
||||||
Caddy with Crowdsec
|
Custom Caddy Builds
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
[Caddy](https://github.com/caddyserver/caddy) built with [Crowdsec Modules](https://github.com/hslatman/caddy-crowdsec-bouncer).
|
Create CLOUDFLARE_API_TOKEN with below permissions.
|
||||||
|
* Zone.Zone:Read
|
||||||
|
* Zone.DNS:Edit
|
||||||
|
|
||||||
|
## [Cloudflare ACME](https://github.com/caddy-dns/cloudflare)
|
||||||
|
|
||||||
|
```Caddyfile
|
||||||
|
{
|
||||||
|
acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## [Dynamic DNS](https://github.com/mholt/caddy-dynamicdns)
|
||||||
|
|
||||||
|
```Caddyfile
|
||||||
|
{
|
||||||
|
dynamic_dns {
|
||||||
|
provider cloudflare {env.CLOUDFLARE_API_TOKEN}
|
||||||
|
domains {
|
||||||
|
example.com
|
||||||
|
}
|
||||||
|
versions ipv4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## [CrowdSec](https://github.com/hslatman/caddy-crowdsec-bouncer)
|
||||||
|
|
||||||
|
```Caddyfile
|
||||||
|
{
|
||||||
|
crowdsec {
|
||||||
|
api_url http://crowdsec:8080
|
||||||
|
api_key {$CROWDSEC_API_KEY}
|
||||||
|
ticker_interval 3s
|
||||||
|
appsec_url http://crowdsec:7422
|
||||||
|
#disable_streaming
|
||||||
|
#enable_hard_fails
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Add Logging to Caddy
|
||||||
|
(logging) {
|
||||||
|
log {
|
||||||
|
output file /logs/access.log {
|
||||||
|
roll_size 10MB # Create new file when size exceeds 10MB
|
||||||
|
roll_keep 5 # Keep at most 5 rolled files
|
||||||
|
roll_keep_for 168h # Delete files older than 14 days
|
||||||
|
roll_uncompressed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ryuu.in www.ryuu.in {
|
||||||
|
route {
|
||||||
|
crowdsec
|
||||||
|
}
|
||||||
|
redir https://git.ryuu.in/ryuupendragon permanent
|
||||||
|
import logging
|
||||||
|
}
|
||||||
|
|
||||||
|
example.ryuu.in {
|
||||||
|
route {
|
||||||
|
crowdsec
|
||||||
|
}
|
||||||
|
reverse_proxy ip:port
|
||||||
|
import logging
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user