Caddy रिवर्स प्रॉक्सी + auto-TLS
एक Caddyfile, Let's Encrypt के ऑटो सर्टिफिकेट, HTTP/3 और सही डिफ़ॉल्ट—किसी भी ऐप के आगे TLS का सबसे तेज़ रास्ता।
Caddy सबसे कम रखरखाव वाला TLS terminator है:प्रमाणपत्र अपने आप लेता-नवीनीकृत करता है और HTTP/3 बॉक्स से बाहर बोलता है। NoctisNode VPS पर ऐप्स के लिए आदर्श द्वार।
इंस्टॉल
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt update && apt install -y caddyएक-फ़ाइल config
caddy reload बिना downtime बदलाव लागू करता है। डोमेन जैसे ही सर्वर IP पर resolve होता है, प्रमाणपत्र माँगे जाते हैं——NoctisNode IPs साफ़ हैं, ACME जाँचें पहली कोशिश में पास।
# /etc/caddy/Caddyfile
example.com {
reverse_proxy 127.0.0.1:3000
encode zstd gzip
headers {
Strict-Transport-Security "max-age=63072000"
X-Content-Type-Options nosniff
}
}सुझाव
- ▹DNS स्विच से पहले साइट को उपलब्ध रखना हो तो DNS-01 challenge इस्तेमाल करें।
- ▹onion सेवाओं के लिए TLS केवल clearnet mirror पर terminate करें——onion पक्ष को certificate नहीं चाहिए।
- ▹Upstream को 127.0.0.1 पर बाँधें ताकि वह सीधे कभी reachable न हो।