Home > Article > Operation and Maintenance > 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
##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/2. Recompile NginxRe-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/ 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.bakCopy 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!