I have installed Nginx in our redhat machine using rpm. Now we want to add nginx-rtmp module, but inorder to add new module as per the document i need to build it by downloading the tar ball. Does it mean that i have to remove the rpm and install it as per the document.
Ref: https://github.com/arut/nginx-rtmp-module/wiki/Getting-started-with-nginx-rtmp
./configure --add-module=/usr/build/nginx-rtmp-module
make
make install
Then you include the load_module directive in the NGINX Plus configuration file for each dynamic module. For example, to enable njs dynamic modules, specify the load_module directives in the top-level (“ main ”) context of the main NGINX Plus configuration file (nginx. conf):
Find which flags Nginx was compiled with under Unixlog --error-log-path=/var/log/nginx/error. log --lock-path=/var/lock/nginx. lock --pid-path=/run/nginx. pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body .... ..
The default location, if no path was specified at compile time, is $NGX_PREFIX/modules . On my macOS system, $NGX_PREFIX defaults to /usr/local/nginx , so the default modules path is /usr/local/nginx/modules ; whereas Ubuntu 17.10 breaks the prefixed monolith up a bit and expects modules in /usr/lib/nginx/modules .
With nginx 1.9.11, it's not necessary to recompile the server, as they added support for dynamic modules. Take a look here: https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/
Unlike Apache, all modules, including the 3rd party modules, are going to be compiled into nginx. So every time you want to add a new module, you have to recompile nginx.
So yes, you have to install it as per the document. There is no much value of keeping 2 nginx runtimes on the same server any way. So you may also want to remove the previous nginx.
I had a similar problem where the auth-pam module broke after an upgrade. Here's what fixed it for me (debian stretch/sid, nginx 1.10.2):
apt install libnginx-mod-http-auth-pam
ln -s /usr/share/nginx/modules-available/mod-http-auth-pam.conf /etc/nginx/modules-enabled/50-mod-http-auth-pam.conf
The config file contains a single “load_module” directive which tells nginx to dynamically load the module on startup. As jekennedy mentioned, this would only apply to newer versions of nginx that support dynamic module loading.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With