HttpSecureLinkModule Q?

Weibin Yao nbubingo at gmail.com
Tue Dec 21 12:16:47 MSK 2010


izrodix at 2010-12-21 16:49 wrote:
> Thanks, for the replies but when i test this configuration users
> continue to download files from this url
> "http://127.0.0.1/subdir1/subdir2/movie.flv" without problem.
> Nginx doesn't return 403;
>   
Are you sure the request is processed in this location? Could you show 
the debug log? (http://wiki.nginx.org/Debugging)

Meanwhile, you can config nginx like this:

location ~ \.flv {
secure_link $arg_md5;
secure_link_md5 your_secret_word$uri;

if ($arg_md5 = "") {
return 403;
}

if ($secure_link = "") {
return 403;
}

root /store;

flv;
}

> location ~ \.flv {
> secure_link $arg_md5;
> secure_link_md5 your_secret_word$uri;
>
> if ($secure_link = "") {
> return 403;
> }
>
> root /store;
>
> flv;
> }
>
> nginx-0.8.54 from freebsd ports.
>
> /usr/local/etc/rc.d/nginx configtest
> Performing sanity check on nginx configuration:
> the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
> configuration file /usr/local/etc/nginx/nginx.conf test is successful
>
> _OPTIONS_READ=nginx-0.8.54
> WITHOUT_DEBUG=true
> WITHOUT_DEBUGLOG=true
> WITH_FILE_AIO=true
> WITH_IPV6=true
> WITHOUT_GOOGLE_PERFTOOLS=true
> WITH_HTTP_MODULE=true
> WITH_HTTP_ADDITION_MODULE=true
> WITH_HTTP_CACHE_MODULE=true
> WITHOUT_HTTP_DAV_MODULE=true
> WITH_HTTP_FLV_MODULE=true
> WITHOUT_HTTP_GEOIP_MODULE=true
> WITH_HTTP_GZIP_STATIC_MODULE=true
> WITHOUT_HTTP_IMAGE_FILTER_MODULE=true
> WITHOUT_HTTP_PERL_MODULE=true
> WITHOUT_HTTP_RANDOM_INDEX_MODULE=true
> WITH_HTTP_REALIP_MODULE=true
> WITH_HTTP_REWRITE_MODULE=true
> WITH_HTTP_SECURE_LINK_MODULE=true
> WITH_HTTP_SSL_MODULE=true
> WITH_HTTP_STATUS_MODULE=true
> WITHOUT_HTTP_SUB_MODULE=true
> WITHOUT_HTTP_XSLT_MODULE=true
> WITHOUT_MAIL_MODULE=true
> WITHOUT_MAIL_IMAP_MODULE=true
> WITHOUT_MAIL_POP3_MODULE=true
> WITHOUT_MAIL_SMTP_MODULE=true
> WITHOUT_MAIL_SSL_MODULE=true
> WITH_WWW=true
> WITH_CACHE_PURGE_MODULE=true
> WITHOUT_ECHO_MODULE=true
> WITH_HEADERS_MORE_MODULE=true
> WITH_HTTP_ACCEPT_LANGUAGE=true
> WITHOUT_HTTP_ACCESSKEY_MODULE=true
> WITHOUT_HTTP_AUTH_PAM_MODULE=true
> WITHOUT_HTTP_AUTH_REQ_MODULE=true
> WITHOUT_HTTP_EVAL_MODULE=true
> WITH_HTTP_FANCYINDEX_MODULE=true
> WITHOUT_HTTP_GUNZIP_FILTER=true
> WITHOUT_HTTP_MOGILEFS_MODULE=true
> WITH_HTTP_MP4_H264_MODULE=true
> WITH_HTTP_NOTICE_MODULE=true
> WITHOUT_HTTP_PUSH_MODULE=true
> WITHOUT_HTTP_REDIS_MODULE=true
> WITHOUT_HTTP_RESPONSE_MODULE=true
> WITHOUT_HTTP_UPLOAD_MODULE=true
> WITHOUT_HTTP_UPLOAD_PROGRESS=true
> WITH_HTTP_UPSTREAM_FAIR=true
> WITH_HTTP_UPSTREAM_HASH=true
> WITH_HTTP_UPSTREAM_KEEPALIVE=true
> WITHOUT_HTTP_ZIP_MODULE=true
> WITHOUT_MEMC_MODULE=true
> WITHOUT_PASSENGER_MODULE=true
> WITHOUT_SLOWFS_CACHE_MODULE=true
> WITHOUT_SUPERVISORD_MODULE=true
> WITHOUT_SYSLOG_SUPPORT=true
> WITH_UDPLOG_MODULE=true
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,160061,160126#msg-160126
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
>   


-- 
Weibin Yao




More information about the nginx mailing list