Install the successful nginx how to add the non-compiled installation module

Source: Internet
Author: User

Already installed Nginx, now need to add a module that has not been compiled and installed
Example: Installing a third-party Ngx_cache_purge module (to clear the cache for a specified URL)
Nginx module is required to recompile nginx, rather than the configuration file reference like Apache.

1.wget http://labs.frickle.com/files/ngx_cache_purge-2.0.tar.gz
TAR-ZXVF ngx_cache_purge-2.0.tar.gz
cd/data0/software/nginx-1.1.10

2. View the commands of Nginx compile and install, which modules are installed
/usr/local/webserver/nginx/sbin/nginx-v

3. Add the modules that need to be installed, recompile
./configure--user=www--group=www--add-module=. /ngx_cache_purge-2.0--prefix=/usr/local/webserver/nginx--with-http_stub_status_module--with-http_ssl_module

Make, do not install will overwrite
Make

4. Replace the Nginx binary file:
Cp/app/nginx/sbin/nginx/app/nginx/sbin/nginx.bak
CP./objs/nginx/app/nginx/sbin/

5. Start Nginx

Install the successful nginx how to add the non-compiled installation module

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.