First of all, it should be clear that nginx does not support dynamic installation and loading of modules, so when you install third-party modules or start new module functions of nginx itself, it covers nginx;
So, be sure to pay attention to:Start by looking at the nginx modules you already have installed! Then when installing a new thing, you need to configure the installed one again.
nginx third-party module installation method:
As has been made clear above, when installing any new features, be sure to check the existing ones first.
Step 1: Review the existing configuration of nginx
cd /usr/local/sbin/
./nginx -V Look at the item after configure arguments: which may be empty, indicating that nothing is configured.
Example:
configure arguments: --add-module=/home/softback/echo-nginx-module-0.60
Instructions that a third-party echo module has been installed. Then when installing https support or other third-party modules, ./configure must also be followed by --add-module=/home/softback/echo-nginx-module-0.60, otherwise it will be overwritten.
Step 2: Install the module
1. Install NGINX third-party modules without installing NGINX (need to make install)
2. Install the nginx module when nginx is already installed(No need to make install, just make)
In summary, installing nginx and installing third-party modules is actually using --add-module to reinstall nginx once, instead of making install, directly overwrite the old nginx file in the compilation directory with the objs/nginx file. If you need to install multiple nginx third-party modules, you only need to specify a few more corresponding --add-modules.
Note: When recompiling, remember to add the previously compiled modules to the configure parameters.
|