Nginx Add new module and third party module

Source: Internet
Author: User

First, the compilation adds the new module

1. View the information of the previously compiled and installed Nginx /usr/local/nginx/sbin/nginx-v

2, enter the Nginx source directory CD nginx-1.8.0

3. Recompile code and modules

./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module--with-file-aio-- With-http_realip_module

4, make, do not make install, or it will be covered by the installation

5, make after the OBJS directory in the more nginx, this is a new version of the program

6, back up the old Nginx Cp/usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.bak

7, the new Nginx program covering the old program CP Objs/nginx/usr/local/nginx/sbin/nginx

8, test the new Nginx program is correct/usr/local/nginx/sbin/nginx-t

9, smooth restart Nginx/usr/local/nginx/sbin/nginx-s reload

10. View Nginx Information/usr/local/nginx/sbin/nginx-v

First, compile Add third-party module

1, re-compile the information /usr/local/nginx/sbin/nginx-v before Nginx

2, enter the Nginx source directory CD nginx-1.8.0

3. Recompile code and modules

./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module--with-file-aio --add-module=/usr/ngx_pagespeed-master

4, make, do not make install, or it will be covered by the installation

5, make after the OBJS directory in the more nginx, this is a new version of the program

6, back up the old Nginx Cp/usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.bak

7, the new Nginx program covering the old program CP Objs/nginx/usr/local/nginx/sbin/nginx

8, test the new Nginx program is correct/usr/local/nginx/sbin/nginx-t

9, smooth restart Nginx/usr/local/nginx/sbin/nginx-s reload

10. View Nginx Information/usr/local/nginx/sbin/nginx-v

Nginx Install the third-party module is actually using--add-module to reinstall the Nginx, but do not make install, but directly to the compilation directory of the Objs/nginx file to overwrite the old Nginx file, recompile, The previously compiled modules are also added.

Nginx Add new module and third party 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.