Use nginx (tengine)-add and use a new module

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.