Features
How to harden your server against common web exploits
At a glance
Run a reverse proxy like Caddy to terminate TLS and filter traffic before it reaches your application.
About the publisher · Editorial standards and corrections
Ask AI about this story

On this page
The core defence
Run a reverse proxy like Caddy to terminate TLS and filter traffic before it reaches your application. Keep your PHP or Node runtime patched to the latest stable release. If you rely on a third-party WAF, verify that its default rules cover the specific field names your application uses, as customised configurations may bypass generic protections.
How our stack handles this
Our single VPS runs Caddy for all TLS termination. It serves our static products, GamingCap and Invoiceful, directly from disk. The dynamic parts, including PracandyFlix and Instalaz, run as separate Node processes behind Caddy. This separation means a vulnerability in one service does not compromise the others. We use systemd timers for scheduled tasks, avoiding the complexity of cron. For a deep dive into how we structure our content, see the PracandyFlix stories.
Because our DNS is managed externally, we cannot rely on DNS-level filtering. Instead, Caddy acts as the single gatekeeper. It handles certificate renewal automatically, removing a common source of configuration drift. The database is shared, so application-level input validation is critical to prevent injection attacks that could corrupt data for all services.

Understanding the threat model
Recent vulnerabilities in PHP, such as those tracked as CVE-2026-109618 and CVE-2026-109619, highlight the risk of unpatched runtimes. These flaws can allow remote code execution if an application processes crafted HTTP traffic. Cloudflare deployed WAF protections for these specific CVEs, noting that customers using default session upload progress names were covered. If you customise these parameters, you must update your WAF rules manually. Do not assume a default rule covers your specific configuration.
Attackers often mutate payloads to bypass static signatures. This is why relying solely on a WAF is insufficient. Your application code must validate all inputs. For static sites like our invoice generator, the risk is lower because there is no server-side execution. However, any dynamic endpoint must assume malicious input by default.
Common questions
Do static sites need a WAF?
Static sites have a smaller attack surface, but a WAF can still block malicious bots and scanning attempts. Since our static builds are served directly by Caddy, we benefit from its built-in rate limiting and TLS handling without the overhead of a full application firewall.
How do I handle shared databases?
Use strict input validation and parameterised queries in every application that connects to the database. Since our Next.js app and Instalaz share a single PostgreSQL instance, a flaw in one application’s query logic could expose data intended for the other. Isolation at the application layer is essential.
Is one server enough for multiple products?
Yes, provided you manage resource limits carefully. Processes on one box compete for memory. We monitor usage closely to ensure that a spike in one product does not starve the others. Regular patching of the operating system and runtimes is non-negotiable for this setup.


