Check out the latest documentation.

Introduction

The easiest way to see how the 51Degrees Varnish module performs is to use the example installation on the GitHub repository. Below are the installation steps for this.



Two detection methods are supported.

 

Hash : A small binary data file containing User-Agents stored as Hash sequences. Very fast detection time.

Pattern :  Searches for device signatures in a useragent returning metrics about the validity of the results. Does NOT use regular expressions.



All methods use an external data file which can easilly be updated.

Installing

If you haven't already, you can obtain a copy of the latest version of the API using one of the links on Downloads.

To install on a linux system, go to the varnish directory with

 

								
$ cd Device-Detection/varnish 
								

 

Then install to the local directory with

 

								
$ .autogen.sh
$ ./configure --with-detection=pattern/hash VARNISHSRC=DIR [VMODDIR=DIR]
$ make
$ sudo make install 
								

 

Where `--with-detection [optional]` sets the detection method you would prefer to use. Defaults to Pattern. `VARNISHSRC [optional]` is set to the source for the correct varnish version when installed in a non standard directory and `VMODDIR` is the directory to install the module to.

 

Then run the included tests with:

 

								
$ make check 
								

 

Next steps:

How to configure the module

Prerequisites and Compatibility

Dependencies:

- g++ 4.8.4+

- autoconf

- automake

- libvarnishapi-dev

- Varnish source

Tested on Versions:

4.0.3+

4.1.5+

5.1.3

5.2.0

6.0.0