Hi guys.. I need some help, new to nginx
Basically i have nginx compile with http-securemodule
as i type nginx -V
nginx version: nginx/1.3.2
built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/usr/local --sbin-path=/usr/local/sbin --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_ssl_module --with-http_gzip_static_module --with-http_secure_link_module --with-pcre=/usr/local/src/pcre-8.21 --with-http_sub_module
Below is my /etc/nginx/conf.d/default.conf
location /cache/ {
## This must match the URI part related to the MD5 hash and expiration time.
secure_link $arg_st,$arg_e;
## The MD5 hash is built from our secret token, the URI($path in PHP) and our expiration time.
secure_link_md5 secretword$uri$arg_e;
## If the hash is incorrect then $secure_link is a null string.
if ($secure_link = "") {
return 403;
}
## The current local time is greater than the specified expiration time.
if ($secure_link = "0") {
return 403;
}
## If everything is ok $secure_link is 1.
}
I am trying protect the folder cache which is located at /srv/www/s51.seasonengine.com/public_html/cache
But when i try access the mp4 file inside the cache folder , it just play, it doesn't return 403 even without the secret token.
How do i get it fixed. I am running the latest nginx with the httpsecuremodule
Thanks!!