nginx 编译自定义模块的例子 (an example how nginx compile with the addon modules )
访问量: 3279
refer to: http://www.ttlsa.com/nginx/nginx-modules-ngx_file_md5/
和:(如何用perl写nginx脚本的例子:)http://www.rackspace.com/blog/add-the-content-md5-http-header-to-nginx/
以及:http://www.ttlsa.com/nginx/how-to-install-nginx-third-modules/
nginx 官方不提供一些模块,而广大用户有些特别需要,例如:下载某个软件之前,需要知道这个软件的md5。既然官方不给,咱就自己做~ 下面是个例子:
1. 下载对应的module:
# cd /usr/local/src # wget https://github.com/cfsego/file-md5/archive/master.zip -O file-md5-master.zip # unzip file-md5-master.zip
2. 编译,安装: (关键在于: --add-module 这个参数)
# wget http://nginx.org/download/nginx-1.4.2.tar.gz # tar -xzf nginx-1.4.2.tar.gz # cd nginx-1.4.2 # ./configure --prefix=/usr/local/nginx-1.4.2 --add-module=../file-md5-master # make # make isntall