Career
Blog
Contact

Varnish Cache for ISPConfig 3 with Nginx SSL Termination

Varnish Cache for ISPConfig 3 with Nginx SSL Termination

Not every slow website can be fixed with another optimization plugin. Sometimes the actual problem is located deeper: in the way traffic flows between the web server, SSL, cache and the application itself.

This project was created as an extension of the ISPConfig 3 configuration for websites built with WordPress and Craft CMS. Its purpose was to organize the entire request flow and add a caching layer in front of Apache.

In practice, the application does not need to generate every response from scratch. When a ready-to-use version of a page is already stored in cache, Varnish can return it faster and reduce the number of requests reaching the backend directly.

How does the architecture work?

For HTTPS traffic, each request passes through several clearly separated layers:

Internet
→ Nginx SSL Termination :443
→ Varnish Cache localhost:7443
→ Apache
→ WordPress or Craft CMS

Nginx handles the HTTPS connection. It then forwards the request to Varnish, which checks whether the response can be served from cache. Only when necessary does the request reach Apache and the application.

For traffic without SSL, the flow is shorter:

Internet
→ Varnish Cache :80
→ Apache
→ WordPress or Craft CMS

Each layer has one clear responsibility. The configuration remains readable, and ongoing server maintenance does not rely on accidental workarounds.

Project scope

The project includes:

  • integration of Varnish Cache with ISPConfig 3
  • configuration of Nginx as an SSL Termination layer
  • Apache as the application backend
  • support for WordPress and Craft CMS
  • automatic cache purging after content updates
  • integration with WP Rocket and Proxy Cache Purge
  • compatibility with CDN Cache & Preload for Craft CMS
  • support for Cloudflare
  • Gzip and Brotli compression on the Nginx layer
  • custom configuration templates for hosts created in ISPConfig 3

Why does this configuration matter?

Website performance is not limited to a result from a single speed test. Server behavior under heavier load, correct HTTPS handling, predictable cache purging and the ability to extend the environment without adding new layers of chaos are equally important.

The goal of this project was not simply to launch Varnish. The more important part was connecting several services into one consistent system that can be maintained and developed over time.

Traffic flow diagram

Traffic flow diagram for Varnish Cache integration with ISPConfig 3, Nginx SSL, Apache, WordPress and Craft CMS

Image description: HTTPS traffic flow in an ISPConfig 3 environment: Internet → Nginx SSL → Varnish Cache → Apache → WordPress or Craft CMS.

Technologies

ISPConfig 3 Linux Debian Nginx Varnish Cache Apache WordPress Craft CMS Cloudflare WP Rocket Brotli

Open-source repository

The source code and deployment instructions are publicly available on GitHub:

View the Varnish Cache for ISPConfig 3 repository

Does your website need to work faster and remain stable?

When the problem cannot be solved with a single plugin, I check the entire flow: application code, database, cache, integrations and server configuration.

Describe your current environment. Let us find where the actual bottleneck is.

Let’s discuss server performance

I usually reply within 24 hours
magnifiercrosschevron-left