HttpSecureLinkModule Q?
    Weibin Yao 
    nbubingo at gmail.com
       
    Tue Dec 21 04:49:27 MSK 2010
    
    
  
izrodix at 2010-12-21 6:44 wrote:
> Hi guys, I'm trying to configure secure link modulаr together with  flv
> streaming module but without success.
>
> Can anyone give me an example with this basic setup.
>     location ~ \.flv {                                                  
>                                                                         
>                                                              
>         root   /store;                                                  
>                                                                         
>                                                             
>         flv;                                                            
>                                                                         
>                                                              
>     }  
>
> the plain url is http://127.0.0.1/subdir1/subdir2/movie.flv
> subdir1/subdir2 are dynamic paths to files.
> I wan;t to protect this path and flv file with temporary url.
>   
The secure link module protect file by md5. You should add a md5 string 
in your url.
For example, the url is like this:
http://127.0.0.1/subdir1/subdir2/movie.flv?md5=NF0H4o7SIxt_vNa9XzzxzQ==
your configuration should be:
    location ~ \.flv {                                                  
        secure_link $arg_md5;
	secure_link_md5 your_secret_word$uri; 
 	if ($secure_link = "") {
       	   return 403;
    	} 
                                                             
        root   /store;                                                  
                                                                                                                           
        flv;                                                             
    }
The md5 hash value of "your_secret_word$uri" will compare with the string specified by "secure_link". If the result is the same, the variable of $secure_link is '1', else it's null string.
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,160061,160061#msg-160061
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>   
-- 
Weibin Yao
    
    
More information about the nginx
mailing list