Video stream and secure link

hi,

i want to use mp4 module and secure link module together.

this is my conf;
location /videos/ {
secure_link $arg_st,$arg_e;
secure_link_md5 ssss$remote_addr$uri$arg_e;
if ($secure_link = “”) {
return 403;
}

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

    mp4;

}

it works with this config but when i change mp4; with
location ~ .mp4$ {
mp4;
}
secure link doesn’t works. streaming an seeking working well.

i need to add this line because i want to stream flv files too.

wat is the true way ? thanks.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,228161,228161#msg-228161

you can copy this location & paste beneath with flv instead of mp4

i’ll try to explain again;

location /videos/ {
/*secure link module codes */
mp4;
} //secure link and mp4 streaming & seeking works well

location /videos/ {
/*secure link module codes */
mp4;
flv;
} //secure links works. mp4 streaming & seeking doesnt works as should
be.

location /videos/ {
/*secure link module codes */
location ~ .mp4$ {
mp4;
}
} //secure link doesn’t works, mp4 streaming & seeking works.

location /videos/ {
/*secure link module codes */
mp4;
location ~ .flv$ {
flv;
}
} //secure link works on mp4 extension, but doesn’t works on flv.
streamings & seekings works well.

location /videos/ {
/*secure link module codes */
location ~ .mp4$ {
mp4;
}
location ~ .flv$ {
flv;
}
} //secure link doesn’t works on flv and mp4. streamings & seekings
works well.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,228161,228172#msg-228172

Hi, as I tried to write in this thread
https://forum.nginx.org/read.php?2,265663,265688#msg-265688 I’m trying
to
accomplish the same

But 1. did you get it to work 2. how did you form your link in the php
script?

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,228161,265810#msg-265810

On Monday 02 July 2012 18:25:15 aryut wrote:

flv;

works well.

http://nginx.org/r/location
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html
http://nginx.org/en/docs/http/ngx_http_secure_link_module.html

location /videos/ {
    secure_link $arg_st,$arg_e;
    secure_link_md5 ssss$remote_addr$uri$arg_e;

    location ~ \.mp4$ {

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

            mp4;
    }

    location ~ \.flv$ {

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

            flv;
    }
}

wbr, Valentin V. Bartenev