Varnish
Varnish is HTTP cache, used for HTTP Server . Varnish is a high-performance HTTP reverse proxy and caching gas pedal that speeds up websites.
Prepare
When referring to this document to use Varnish, please read and ensure the following points:
-
Login to Websoft9 Console and find or install Varnish:
- Go to My Apps listing applications
- Go to App Store installing target application
-
This application is installed by Websoft9 console.
-
The purpose of this application complies with the BSD2Clause open source license agreement.
-
Configure the domain name or server security group opens external network ports for application access.
Getting started
WordPress Setting up the Varnish Cache
-
Install the WordPress and Varnish applications in the Websoft9 console
Make sure that the domain name configured for Varnish is the one that will eventually be made available for users to access
-
Edit the Varnish application's
. /src/default.vcl
file with the WordPress container name and container port as the connection point
backend default {
.host = "wordpress_shlez";
.port = "80";
}
-
rebuild the Varnish application, Varnish has cached WordPress.
-
Visiting the domain that Varnish is bound to, you can see that the access speed is greatly improved!
Configuration options
- Cache size: set via VARNISH_SIZE environment variable
- Configuration file:
. /src/default.vcl