varnish

Varnish and nginx on Centos 7

yum install varnish
yum install nginx

Config nginx listen on port 8081

server {
        listen 8081;
        server_name www.example.com;
        rewrite ^(.*) http://example.com$1 permanent;
        }
server {
        listen 8081 default_server;
        server_name example.com;
        ....................

}

Varnish

  • Config varnish: vi /etc/varnish/default.vcl (for wordpress)
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the


QR Code for https://setupexample.com/tags/varnish