1. Add modules for nginx
Go to the nginx source code package and add the corresponding module to configure again.
./Configure -- add-module =/path/to/Module
For example, if the ngx_http_push Module I downloaded is stored in the/usr/local/ngx_modules directory and the source code directory of this module is ngx_http_push, the configure command is
./Configure -- add-module =/usr/local/ngx_modules/ngx_http_push
If configure is okay, execute it directly.
Make&&Make Install
The module is static.
2. Use dso_install of tengine
Dynamic Loading in the new tengine features. In the sbin directory of the installed tengine, there are two Commands: nginx and dso_install.
You can use./nginx-m to view the loaded modules, and use./nginx-L to view the list of related modules, including detailed configuration instructions.
Using dso_install to install a module is much simpler and can be directly executed.
./Dso_install -- add-module =/path/to/Module
Then, the compiled so file will be copied directly to the Module Directory of tengine, and then added to nginx. conf.
DSO {load ngx_http_push.so ;}
Then execute./nginx-s reload to reload the configuration file.