How To Configure Proxy Settings

How To Configure Proxy Settings

Before getting started with proxy, read: http://varnish.projects.linpro.no/static/getting-started.html.
Then, open 

 

/etc/varnish/default.vcl

 

and begin configuring to suit your needs. To configure simple round-robin proxying of 2 webservers with the following IP/Port

 

web1 - 192.168.1.100:80
web2 - 192.168.1.466:80

 

use the following entry:

 

backend web1 {
.host = "192.168.1.100";
.probe = {
.url = "/";
.interval = 1s;
.timeout = 3s;
.window = 8;
.threshold = 3;
}
}
backend web2 {
.host = "192.168.1.466";
.probe = {
.url = "/";
.interval = 1s;
.timeout = 3s;
.window = 8;
.threshold = 3;
}
}
 
director lb round-robin {
{
.backend = web1;
}
 
{
.backend = web2;
}
}
 
sub vcl_recv {
set req.backend = lb;
}

 

 When the configuration has been completed simply restart varnish

 

# /etc/init.d/varnish restart

 

and you are done!


    • Related Articles

    • Configure MySQL Master-Master replication

      Configure MySQL Master-Master replication Category: Databases &nbsp Configuring MySQL in a master-slave replicate model adds complexity to the application utilizing the database. The application has to be programmed to send the write queries only to ...
    • How to create Cloud Server with Windows OS?

      Log in to your account at https://control.vps.net/login. Open the dashboard and access the Cloud Servers section as outlined below. You can select Cloud Servers section in the upper toolbar, follow the quick link My Cloud Servers, or go to the box ...
    • On Demand streaming - How does it work

      On Demand streaming – How does it work Category: On Demand Streaming &nbsp Level 3’s On Demand Streaming platform is unique in the CDN streaming industry in that it supports both forward and reverse proxy caching technology. This offers the customer ...
    • Galera MySQL Recommended Cluster Configuration

      Galera/MySQL recommended cluster configuration Category: Template Information &nbsp For practical purposes Galera/MySQL vendor recommend to reserve a “Reference Node” in the cluster. We propose the cluster looks like: Reference Node cluster A ...
    • Colouring Prompts to Differentiate Users

      Colouring Prompts to Differentiate Users Category: Getting Started &nbsp Command prompts are something that most of the big distributions have standardised these days. With BASH as the default shell with its highly customisable command prompt, it’s a ...