Check out the latest documentation.

Introduction

This is developer documentation for the V3.2 51Degrees C API, and details the NGINX Web App in more detail. The easiest way to see how the 51Degrees NGINX module performs is to use the example installation on the GitHub repository. Below are the installation steps for this.

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 nginx directory with

 

								
$ cd Device-Detection/nginx 
								

 

Then install to the local directory with either

 

								
$ make install pattern 
								

 

or

 

								
$ make install trie 
								

 

depending on the desired detection method.

Then test the installation was successful by running

 

								
$ make test 
								

 

51Degrees dynamic module can be used in Nginx version 1.9.11 or later. For versions 1.11.5 (R11) and 1.11.10 (R12) there are pre-built modules in the nginx/modules directory of GitHub.

 

To build the module as ngx_http_51D_module.so for another version, define VERSION when calling make like:

 

								
$ make install pattern VERSION=1.9.11

								

 

By default, the module will be built to the build/modules directory.

 

To load the module, copy the .so to your modules directory and include the following near the top of the Nginx config file.

 

								
load_module modules/ngx_http_51D_module.so;

								

 

To compile as a static module rather than dynamically, define STATIC_BUILD when calling make like:

 

								
$ make install pattern STATIC_BUILD=1

								

 

Next steps:

How to configure the module

Prerequisites and Compatibility

Nginx 1.12.1+

g++ 4.8.4+