# nginx Embedded Perl module for adding a Content-MD5 HTTP header # # This perl module, will output an MD5 of a requested file using the # Content-MD5 HTTP header, by either pulling it from a file of the # same name with .md5 appended to the end, if it exists, or will # calcula...
location / { root html; index index.html index.htm; add_header Content-MD5 $file_md5; ``` ` ### 测试结果 ```bash # 启动nginx ./usr/local/nginx/sbin/nginx ``` 通过curl进行测试,Content-MD5 可以正常被响应。md5值也与本地测算相同。 ; --MD5 ngx.say("ngx.md5 : ", ngx.md5("123"), "") --http time ngx.say("ngx.http_time : ", ngx.http_time(ngx.time()), "") --ngx.var.http_referer = "***" '; access_log /var/log/nginx/ooxx.com.access.log...
fastcgi_cache_key http://hosthostrequest_uri :该指令用来设置web缓存的Key值,nginx根据Key值 md5 哈希存储.一般根据host(域名)、host(域名)、request_uri(请求的路径)等变量组合成proxy_cache_key ; fastcgi_pass :指定 FastCGI 服务器监听端口与地址,可以是本机或者其它。