Caddy Web Server
Required reverse proxy with automatic HTTPS
Required service - Caddy is the reverse proxy that powers all DAMP sites with automatic HTTPS certificates.
Always Required
Caddy is essential for routing traffic to your sites.
Overview
Caddy handles:
- 🔒 Automatic SSL - Generates certificates for .local domains
- 🌐 Reverse Proxy - Routes requests to your sites
- ⚡ HTTP/2 Support - Modern protocol support
- 🔄 Auto Reload - Configuration updates without downtime
Default Configuration
Image: caddy:latest
Container: damp-web
Ports:
- 80:80 # HTTP
- 443:443 # HTTPS
Network: devnet
Volumes:
- damp_caddy_data:/data
- damp_caddy_config:/configConnection Information
From Docker Containers
# Access Caddy API (if enabled)
curl http://damp-web:2019/config/From Host Machine
# HTTP
http://localhost
# HTTPS (with valid cert for .local domains)
https://mysite.localCertificate Management
Automatic Certificates
Caddy automatically generates SSL certificates for all .local domains. View certificates in DAMP's Services page.
View Installed Certificates
DAMP displays:
- Domain name
- Expiration date
- Certificate status
Trust Certificates
To trust Caddy's CA certificate on your system:
- Click "Install Certificate" in DAMP
- Windows will prompt for UAC elevation
- Certificate installed to system trust store
- Browse to https://yoursite.local without warnings
How Sites Use Caddy
When you create a site, DAMP automatically:
- Updates Caddy configuration
- Creates reverse proxy rules
- Generates SSL certificate for the domain
- Reloads Caddy (zero downtime)
┌─────────────────────────────────────────┐
│ Browser: https://mysite.local │
└────────────┬────────────────────────────┘
│
↓
┌─────────────────────────────────────────┐
│ Caddy (damp-web) │
│ - Terminates SSL │
│ - Reads Caddyfile config │
│ - Routes to correct container │
└────────────┬────────────────────────────┘
│
↓
┌─────────────────────────────────────────┐
│ Site DevContainer │
│ - Receives plain HTTP on port 80 │
│ - PHP application responds │
└─────────────────────────────────────────┘Caddyfile Location
Caddy configuration is stored in the damp_caddy_config volume:
/config/caddy/CaddyfileDAMP automatically manages this file - manual edits are not necessary.
Production Parity
Developing with HTTPS locally matches production environments, catching SSL-related bugs early!