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

How to add new modules to compiled nginx

王林
王林forward
2020-10-23 15:57:232466browse

How to add new modules to compiled nginx

View existing modules

(Recommended tutorial: nginx tutorial)

/usr/local/nginx/sbin/nginx -V

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/

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,不然就真的覆盖了

Make a backup first, A spare tire is still needed

/usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

Copy the compiled files to your original sbin directory

cp ./objs/nginx /usr/local/nginx/sbin/

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete