Nginx file is very small but the performance is very efficient, one of the reasons to win the Apache,nginx file small is that Nginx comes with relatively few features, fortunately, the third-party module, the third-party module makes Nginx more powerful. In the installation of modules, Nginx does not appear to be easy to install Apache module, of course, there is no php installation extension. In the native Nginx, he can not dynamically load the module, So when you install a third-party module, you need to overwrite the Nginx file. Now let's see how to install the Nginx third module .
Nginx third-party module installation method:
./configure--prefix=/Your installation directory--add-module=/third-party module directory
To install the Pagespeed module instance
Installing Nginx third-party modules without nginx installation
#./configure--prefix=/usr/local/nginx-1.4.1--with-http_stub_status_module--with-http_ssl_module--with-http_ Realip_module--with-http_image_filter_module--add-module=. /ngx_pagespeed-master--add-module=/third-party module catalog # make# make install#/usr/local/nginx-1.4.1/sbin/nginx
install Nginx module
In the case of Nginx installation
#./configure--prefix=/usr/local/nginx-1.4.1--with-http_stub_status_module--with-http_ssl_module--with-http_ Realip_module--with-http_image_filter_module--add-module=. /ngx_pagespeed-master# make#/usr/local/nginx-1.4.1/sbin/nginx-s stop# CP objs/nginx/usr/local/nginx/sbin/nginx#/ Usr/local/nginx-1.4.1/sbin/nginx
In contrast, just one more step to overwrite the Nginx file.
Summary, installation of Nginx installation third-party modules are actually re-installed with the –add-module Nginx, do not make install, but directly to the compilation directory objs/ Nginx files directly overwrite the old nginx files. If you need to install more than one Nginx third-party module, you only need to specify several corresponding –add-module.
[WARNING] Note: When recompiling, remember to add the previously compiled modules together with the Configure parameters. [/warning]
Nginx provides a lot of nginx third-party modules to provide installation, address: Http://wiki.nginx.org/3rdPartyModules
Reprinted from: http://www.ttlsa.com/nginx/how-to-install-nginx-third-modules/
This address can also be referred to below: http://taokey.blog.51cto.com/4633273/1318719
Nginx (iv) Installing a third-party module