-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31f1318
commit 2ac19d3
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 🚀 Installation | ||
|
||
```bash | ||
# Step 1: Clone the caddy-waf repository from GitHub | ||
git clone https://github.com/fabriziosalmi/caddy-waf.git | ||
|
||
# Step 2: Navigate into the caddy-waf directory | ||
cd caddy-waf | ||
|
||
# Step 3: Clean up and update the go.mod file | ||
go mod tidy | ||
|
||
# Step 4: Fetch and install the required Go modules | ||
go get github.com/caddyserver/caddy/v2 | ||
go get github.com/caddyserver/caddy/v2/caddyconfig/caddyfile | ||
go get github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile | ||
go get github.com/caddyserver/caddy/v2/modules/caddyhttp | ||
go get github.com/oschwald/maxminddb-golang | ||
go get github.com/fsnotify/fsnotify | ||
go get -v github.com/fabriziosalmi/caddy-waf | ||
go mod tidy | ||
|
||
# Step 5: Download the GeoLite2 Country database (required for country blocking/whitelisting) | ||
wget https://git.io/GeoLite2-Country.mmdb | ||
|
||
# Step 6: Build Caddy with the caddy-waf module | ||
xcaddy build --with github.com/fabriziosalmi/caddy-waf=./ | ||
|
||
# Step 7: Fix Caddyfile format | ||
caddy fmt --overwrite | ||
|
||
# Step 8: Run the compiled Caddy server | ||
./caddy run | ||
``` |