Apache VirtualHost, Proxy & Cache Config Builder

Generate production Apache 2.4 VirtualHost configuration files (*.conf and *-le-ssl.conf) with path-based reverse proxy routes and disk caching, using a2ensite and Let's Encrypt.

VirtualHost

Options & SSL

Path-based reverse proxy routes

The root handler above covers /. Add extra paths here — e.g. forwarding a single bot or webhook path to a backend while the rest of the site stays static.

No extra proxy routes. The root handler above still applies.

{{ trailingSlashWarning }}

Each route becomes a ProxyPass / ProxyPassReverse pair. Per Apache's own docs, if the path ends with / the target must too (and vice versa), or requests to the backend can lose a slash.

Disk caching (mod_cache_disk)

Targets Apache 2.4. Requires a2enmod cache cache_disk expires headers. On Debian/Ubuntu, enabling cache_disk also sets a default CacheRoot /var/cache/apache2/mod_cache_disk — Apache refuses to start with mod_cache_disk loaded and no CacheRoot at all, but the package supplies one automatically.

HSTS & compression

Requires a2enmod headers (same module the cache block's Header merge needs).

Requires a2enmod deflate.

About Apache VirtualHosts

Apache uses <VirtualHost *:80> and <VirtualHost *:443> directives to manage HTTP and HTTPS traffic per domain, mapping domain names to document roots or backend proxy targets. Everything on this page targets Apache 2.4 and the Debian/Ubuntu a2enmod/a2ensite tooling.

Path-based routes use ProxyPass/ProxyPassReverse exactly as documented for mod_proxy, and the cache block follows mod_cache and mod_cache_disk's own directive syntax — see the inline "i" hints for specifics and module requirements.

Everything is generated locally in your browser as you edit the fields above. Nothing you configure here is saved between visits — copy or download the config before leaving the page.