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