ویب سرورز
خودکار HTTPS اور آسان کنفیگریشن والا جدید ویب سرور
Let's Encrypt سے بغیر کسی ترتیب کے خودکار SSL/TLS سرٹیفیکیٹ حاصل کرنا اور ان کی تجدید کرنا
انسانوں کے لیے پڑھنے کے قابل Caddyfile فارمیٹ جو لکھنے اور منیج کرنے میں آسان ہے، یا پروگرامی کنٹرول کے لیے JSON
HTTP/2، HTTP/3 (QUIC)، WebSocket، gRPC اور دیگر جدید پروٹوکولز کے لیے بلٹ اِن سپورٹ
لوڈ بیلنسنگ، ہیلتھ چیکس، سرکٹ بریکرز، اور active/passive failover کے ساتھ جدید reverse proxy
ہزاروں حسبِ ضرورت ڈومینز والے SaaS پلیٹ فارمز کے لیے سرٹیفیکیٹ فوری (on-demand) جاری کریں
کنکشن ختم کیے بغیر یا downtime پیدا کیے بغیر کنفیگریشن کو بتدریج ری لوڈ کریں
# Install Caddy from official repository
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
# Or download binary directly
curl -o caddy 'https://caddyserver.com/api/download?os=linux&arch=amd64'
chmod +x caddy
sudo mv caddy /usr/local/bin/
# Verify installation
caddy versionStatic Site کا فوری آغاز:# Create Caddyfile
cat > Caddyfile <<EOF
example.com {
root * /var/www/html
file_server
}
EOF
# Start Caddy
sudo caddy start
# Or run in foreground
sudo caddy runReverse Proxy مثال:cat > Caddyfile <<EOF
api.example.com {
reverse_proxy localhost:8080
}
EOF
sudo caddy run
# Simple static site with automatic HTTPS
example.com {
root * /var/www/html
file_server
encode gzip
}
# Reverse proxy to backend
api.example.com {
reverse_proxy localhost:3000
}
# Multiple backends with load balancing
app.example.com {
reverse_proxy localhost:8080 localhost:8081 localhost:8082 {
lb_policy round_robin
health_uri /health
}
}
# SPA with fallback
spa.example.com {
root * /var/www/spa
try_files {path} /index.html
file_server
}اعلیٰ خصوصیات:encode gzip zstd استعمال کریںfile_server {precompressed gzip br} ترتیب دیںheader directive استعمال کریں
ہماری سادہ VPS نشریاتی عمل کے ساتھ منٹ میں شروع
Deploy in about 2 minutes • Full root access • Support by ticket and email