Classify articles under Docker
Docker Nginx adds customized modules (nginx http concat, ngx_cache_purge)
Docker Nginx adds customized modules
start
I recompiled according to the official documents for more than ten times without success, until I found such an article on the Internet: https://soulteary.com/2021/03/22/how-to-use-nginx-third-party-modules-efficiently-in-the-container-era.html
I don't know when Nginx supported dynamically adding modules
load_module , so I went to see it
/etc/nginx/modules Directory. I found that the module I compiled was there
Google did not search for a complete Docker in both Chinese and English to add a custom module (or his own statement is incorrect). To avoid stepping on the pit again, I write this article
Here is an example of adding nginx http concat and ngx_cache_purge modules
What I'm talking about here is based on official documents, and then focuses on self packaging to build images
Tips: You need to solve Go to foreign websites "Problems", otherwise there will be some problems in the construction
First create a folder mkdir my-nginx cd my-nginx