Welcome! Log In Create A New Profile

Advanced

MP4 module and X-Accel-Redirect

Adrián Navarro
April 20, 2012 08:20PM
Hello

I currently have a setup involving nginx-extras (1.1.19) and PHP,
making heavy use of the X-Accel-Redirect heades to serve files with
previous authentication. This also enables range requests and so on,
which work flawlessly.

Sadly, I can't seem to make this approach work with the MP4 streaming
module. It works as expected with a standalone mp4 file and the
?start= parameter works just fine. But passing a request like this:

/request?token=xxx&start=60

Does not work and yields the entire file instead.

My config approach is the following:

location ~ \.php$ {
internal;

fastcgi_send_timeout 300;
fastcgi_read_timeout 300;

fastcgi_index index.php;

include fastcgi_params;

fastcgi_pass 127.0.0.1:9000;
}

location ~ \.mp4$ {
mp4;
}

location /files/ {
rewrite_by_lua '
......misc script to track connections.....
';
internal;
mp4;
alias /home/service/files/;
}

location /priority {
mp4;
rewrite ^ /request.php last;
}


I cannot try any more or different combinations for the mp4 directive,
I've tried to put it everywhere and just in a few places, and still,
can't manage to get anything. Some time Google shows some message
similar to this but dead in the wind without answer.

Thank you for your time.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

MP4 module and X-Accel-Redirect

Adrián Navarro April 20, 2012 08:20PM

Re: MP4 module and X-Accel-Redirect

Adrián Navarro April 21, 2012 10:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 191
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready