How to enable LUA module in Nginx+

Nginx+ natively comes with LUA modules. You may enable the LUA modules depending on the user permission that you have.

If you have root permission,

You may simply add the following modules on your configuration file (e.g. nginx.conf)

load_module /etc/nginx/modules/;

load_module /etc/nginx/modules/;

If you do not have root permission,

You may extract the modules from nginx installer and put them in a folder that you have access to. For example, /usr/app/nginx/modules

Afterwards, you can use the location to specify the modules:

load_module /usr/app/nginx/modules/;
load_module /usr/app/nginx/modules/;

Finally, you can make a symlink inside the nginx home folder to the new modules folder. For example,

Lastly, you may reload the nginx service for the changes to take effect.

For more information, please visit the NGINX LUA documentation.