Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 1.57 KB

NGINXPLUS.md

File metadata and controls

54 lines (44 loc) · 1.57 KB
  • For Amazon Linux, CentOS, and RHEL:

    yum install nginx-plus-module-lua
  • For Ubuntu:

    apt-get install nginx-plus-module-lua
2. Remove Pre-installed Nettle
sudo yum -y remove nettle
3. Install Nettle from Source

Download and compile nettle using the version appropriate for your environment:

For Amazon Linux, CentOS, and RHEL:

yum -y install m4 # prerequisite for nettle
cd /tmp/
wget https://ftp.gnu.org/gnu/nettle/nettle-3.3.tar.gz
tar -xzf nettle-3.3.tar.gz
cd nettle-3.3
./configure
make install
4. Install Luarocks and Dependencies
sudo yum install luarocks
sudo luarocks install lua-cjson
sudo luarocks install lustache
sudo luarocks install lua-resty-nettle
sudo luarocks install luasocket
sudo luarocks install lua-resty-http
5. Install PerimeterX NGINX Plugin
sudo luarocks install perimeterx-nginx-plugin
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