Home > Operation and Maintenance > Nginx > How to add new modules to compiled nginx

How to add new modules to compiled nginx

王林
Release: 2020-10-23 15:57:23
forward
2567 people have browsed it

How to add new modules to compiled nginx

View existing modules

(Recommended tutorial: nginx tutorial)

/usr/local/nginx/sbin/nginx -V
Copy after login

Here I installed and configured SSL I want to add the FastDFS module here

How to add new modules to compiled nginx

##Copy the red area and write it down in a small notebook

./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/fastdfs-nginx-module/src/
Copy after login

How to add new modules to compiled nginx

2. Recompile Nginx

Re-execute the above at this location: ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/usr /local/fastdfs-nginx-module/src/

How to add new modules to compiled nginx

Don’t make install, otherwise it will really overwrite

make    //千万不要make install,不然就真的覆盖了
Copy after login

Make a backup first, A spare tire is still needed

/usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
Copy after login

Copy the compiled files to your original sbin directory

cp ./objs/nginx /usr/local/nginx/sbin/
Copy after login
OK After the new module is installed, how to use it is the same as before, just adding a new module

The above is the detailed content of How to add new modules to compiled nginx. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template