Installing the Enforcer
Installing on Ubuntu
Ubuntu 14.04
1. Update existing dependencies for Ubuntu 16.04 or higher
2. Add the official NGINX repository to get the latest version of NGINX
If an add-apt-repository: command not found
error is returned, run:
sudo apt-get -y install software-properties-common
3. Install the dependencies for Ubuntu 14.04:
4. Download and install LuaRocks
5. Download and install Nettle
6. Install the remaining dependencies
7. Install the HUMAN NGINX Plugin
Ubuntu 16.04 and Higher
1. Update existing dependencies for Ubuntu 16.04 or higher
2. Add the official NGINX repository to get the latest version of NGINX
If an add-apt-repository: command not found
error is returned, run:
sudo apt-get -y install software-properties-common
3. Update existing dependencies for Ubuntu 16.04 or higher
4. Install the dependencies for Ubuntu 16.04 or higher
5. Install the HUMAN NGINX enforcer
Installing on CentOS 7
Important Notice
NGINX does not provide an NGINX http lua module for CentOS/RHEL via RPM. This means that you would need to compile the module from source.
1. Update and Install dependencies
2. Create a temp directory
3. Download required source files
4. Unpackage all source files
5. Install luarocks
6. Install Nettle
7. Install LuaJIT
8. Build and Install NGINX with required modules
9. Install HUMAN Nginx enforcer & dependencies
10. Optionally, if you are testing in a new environment you may need to configure the following:
- Add the user “nginx”
ShellShell - Create a systemd service for NGINX
ShellShell - Paste the following in the file you have just created:
- Enable and start the NGINX service
ShellShellInstalling on CentOS 9
1. Install compat-lua
packages, these packages contain Lua 5.1 version, which is compatible with OpenResty (epel repository has to be enabled):
2. Install Lua packages and PerimeterX Enforcer using “lua 5.1” version:
Adjust pxconfig.lua
configuration file and restart OpenResty.
Installing on NGINX+
RHEL 7.4 and above
If you are already using NGINX+, the following steps cover installing the NGINX+ Lua module and HUMAN NGINX enforcer.
Please Note
The HUMAN NGINX plugin can be installed on NGINX+ up to version R15. There is currently a known bug in R16 which crashes NGINX when calling init_worker_by_lua_block
(required by the HUMAN plugin). Until this bug is fixed, HUMAN will not support installations using R16.
1. Install the NGINX+ lua module according to the version of NGINX+ installed. (The example shows R15)
2. Make sure Nettle is removed
3. Install the development tools
4. Compile and install Nettle
5. Install Luarocks and the HUMAN Lua enforcer dependencies
6. Install the HUMAN enforcer
Amazon Linux, CentOS and RHEL 7.3 and lower
1. Install the Lua modules provided by NGINX
2. Remove pre-installed Nettle
3. Install Nettle
Download and compile nettle using the version appropriate for your environment:
4. Install Luarocks and Dependencies
5. Install HUMAN NGINX enforcer
6. Modify Selinux (Consult with your internal System Administrator)
On CentOS 7 and other Linux operating systems you may need to modify or disable Selinux. If you get the following error:
nginx: lua atpanic: Lua VM crashed, reason: runtime code generation failed, restricted kernel?
You will need to make one of the following changes:
- To disable SELinux:
RUN setenforcer 0
- To enable execmem for httpd_t:
RUN setsebool httpd_execmem 1 -P