Skip to content

sigsci-module-nginx-native

Nginx Native Module for Signal Sciences NGWAF

Development Environment and Procedures

See DEVELOPMENT.md

Release Package Procedures

See RELEASE.md

Troubleshooting Tips and FAQs

See TROUBLESHOOTING.md

Builds ngx_http_sigsci_module.so as plugin for nginx distributed by nginx.org and nginx-plus.

These packages are created per supported OS:

  • nginx-module-sigsci-nxo_1.nn.nn-0
  • nginx-module-sigsci-nxp_1.nn.nn-0

Example to install version for nginx.org:

sudo apt-get install nginx-module-sigsci-nxo

or apt-get install nginx-module-sigsci-nxo=1.15.9*

Example to install version for nginx-plus:

sudo apt-get install nginx-module-sigsci-nxp

Monitoring new Releases of nginx-org and nginx-plus

Monitoring for new releases of NGINX, NGINX+, and supported Linux Distros is done automatically with MonitorLinks. See monitor-link-svc

The nginx-org releases can be downloaded frome here:

http://nginx.org/download/

The nginx-plus releases are specified here:

https://docs.nginx.com/nginx/releases/

Configuration:

Most configuration parameters are set in the global "http" scope similar to the SigSci Lua counterpart. However inspection may be turned on or off per "location" and "server" scope.

Also, you must update the /etc/nginx/nginx.conf to load the module.

For example after the "pid /run/nginx.pid;" line: NOTE: nginx-org only, do NOT load for nginx-plus

load_module /etc/nginx/modules/ndk_http_module.so;

For nginx.org package: "nxo"

load_module /etc/nginx/modules/ngx_http_sigsci_nxo_module.so;

For nginx-plus package: "nxp"

load_module /etc/nginx/modules/ngx_http_sigsci_nxp_module.so;

nginx-plus Certification

NOTE: we have already been certified for nginx-plus - this section explains how we did it

To certify the module for nginx-plus build the packages for nginx-plus. See above Packaging for that instruction.

Then run the certification test which will output a file called: nginx-plus-module-prove-test-verbose

If at the end of the file we get a "Result: PASS" then it passed certification.

Artifacts needed by nginx-plus include:

  • nginx-plus-module-prove-test-verbose
  • Packages for each supported platform
  • Directions for nginx-plus to run the certification test with our supplied packages. See README_NXP
  • nginx-plus marketing support document
  • Module documentation that describes loading and configuration.

Example configuration file

user nginx;
worker_processes auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;

# load the ndk_http_module.so for nginx-org only - DO NOT load for nginx-plus
load_module modules/ndk_http_module.so;

# have nginx load our native module
load_module modules/ngx_http_sigsci_module.so;

events {
    worker_connections 768;
}

http {

    ##
    # sigsci module settings
    ##
    sigsci_enabled       on;
    sigsci_debug         off;
    sigsci_handler_phase preaccess;
    sigsci_agent_max_post_len  1000000;
    sigsci_agent_host     unix:/var/run/sigsci.sock;
    #sigsci_agent_host    tcp:localhost;
    #sigsci_agent_port    9090;
    sigsci_agent_timeout  100;
    sigsci_anomaly_resp_size 524288;
    sigsci_anomaly_resp_time 1000;

    ...
    ...

    server {

        # sigsci_enabled set to "off" for a location
        location /noinspect/ {
            sigsci_enabled  off;
            proxy_pass      http://127.0.0.1:80/noinspect/;
        }
        ...
    }

    server {

        # sigsci_enabled set to "off" for the server scope
        sigsci_enabled  off;

        # sigsci_enabled set to "on" for a particular location
        location /inspect/ {
            sigsci_enabled  on;
            proxy_pass      http://127.0.0.1:80/noinspect/;
        }
        ...
    }