I also tried something like this, but this also doesn't work:
location ~ ^/hls/(long|short)/([0-9a-zA-Z]+)\.m3u8 {
alias /tmp/hls/$1/$2.m3u8;
auth_request /hls/auth-play/$1/$2;
}
location ~ ^/hls/auth-play/(long|short)/([0-9a-zA-Z]+) {
proxy_pass http://127.0.0.1:8080/on_play.php?app=$1&room=$2;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
}
But this also doesn't work.
location ~ ^/hls/(long|short)/([0-9a-zA-Z]+)\.m3u8 {
alias /tmp/hls/$1/$2.m3u8;
auth_request /hls/auth-play/$1/$2;
}
location ~ ^/hls/auth-play/(long|short)/([0-9a-zA-Z]+) {
proxy_pass http://127.0.0.1:8080/on_play.php?app=$1&room=$2;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
}
But this also doesn't work.