njs Scripting Language
Integrate njs code into the NGINX event‑processing model for HTTP and TCP/UDP traffic.
Installation Instructions
Install the NGINX JavaScript module.
For Amazon Linux, CentOS, Oracle Linux, and RHEL:
$ yum install nginx-plus-module-njs
For Debian and Ubuntu:
$ apt-get install nginx-plus-module-njs
For SLES:
$ zypper install nginx-plus-module-njs
Put both of the following directives in the top-level (“main”) context of the main NGINX Plus configuration file, /etc/nginx/nginx.conf:
load_module modules/ngx_http_js_module.so; load_module modules/ngx_stream_js_module.so;
Perform additional configuration as required by the module.
Reload NGINX Plus to enable the module:
$ nginx -t && nginx -s reload