./configure --prefix=/data/nginx --with-http_ssl_module --with-http_v2_module --with-http_secure_link_module 默认secure_link没有编译进nginx需要添加编译选项的模块--with-http_secure_link_module ********************************nginx 防盗链**************** server { listen 8081; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } location /image/ { secure_link $arg_md5,$arg_expires; secure_link_md5 "$secure_link_expires$uri$remote_addr secret"; #校验失败 if ($secure_link = "") { return 403; } #防盗链时间过期<